1747
votes
51answers
615k views

How can I get query string values?

Is there a plugin-less way of retrieving query string values via jQuery (or without)? If so, how, and if not what plugin do you recommend?
1542
votes
17answers
775k views

How can I make a redirect page in jQuery/JavaScript?

How can I redirect the user from one page to another using jQuery?
1065
votes
27answers
734k views

Check checkbox checked property using jQuery

I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery. For example, if the age checkbox is checked, then I need to show a textbox to ...
1020
votes
3answers
97k views

How do I “think in AngularJS/EmberJS (or other client MVC frameworks)” if I have a jQuery background?

Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the paradigm shift that is necessary? Here are a few questions that ...
1009
votes
23answers
669k views

How do I check a checkbox with jQuery or JavaScript?

I want to do something like this $(".myCheckBox").checked(true); or $(".myCheckBox").selected(true); I wish to set the value. Is such a thing built into jQuery?
761
votes
17answers
468k views

Add table row in jQuery

What is the best method in jQuery to add an additional row to a table as the last row? Update Is this acceptable: $('#myTable').append('<tr><td>my data</td><td>more ...
748
votes
8answers
181k views

event.preventDefault() vs. return false

When I want to prevent other event handlers from executing after a certain event is fired, I can use one of two techniques. I'll use jQuery in the examples, but this applies to plain-JS as well: #1 ...
571
votes
6answers
83k views

.prop() vs .attr()

So jQuery 1.6 has the new function prop(). $(selector).click(function(){ //instead of: this.getAttribute('style'); //do i use: $(this).prop('style'); //or: ...
504
votes
15answers
511k views

jQuery get specific option tag text

All right, say I have this: <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option ...
498
votes
10answers
370k views

Get selected text from dropdownlist using jQuery

How can I get an ASP dropdownlist selected text in jQuery, not using the selected value?
486
votes
7answers
134k views

Abort Ajax requests using jQuery

Using jQuery, how can I cancel/abort an Ajax request that I have not yet received the response from?
474
votes
11answers
383k views

Serializing to JSON in jQuery

I need to serialize an object to JSON. I'm using jQuery. Is there a "standard" way to do this? My specific situation: I have an array defined something like this: var countries = new Array(); ...
445
votes
20answers
512k views

How to get the current URL in jQuery?

I am using jQuery. How do I get the path of the current URL and assign it to a variable? Example URL: http://localhost/menuname.de?foo=bar&amp;number=0
440
votes
33answers
161k views

How to detect a click outside an element?

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area. Is something like this ...
390
votes
28answers
31k views

Current commonly accepted best practices around code organization in JavaScript [closed]

As JavaScript frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem... How in the world do you keep this organized? Put all your ...

1 2 3 4 5 9223
15 30 50 per page