1631
votes
47answers
572k 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?
1420
votes
15answers
715k views

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

How can I redirect the user from one page to another using jQuery?
963
votes
25answers
679k 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 ...
923
votes
22answers
616k 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?
716
votes
17answers
446k 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 ...
702
votes
8answers
164k 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 ...
530
votes
3answers
51k views

How do I “think in AngularJS” 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 ...
525
votes
6answers
74k 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: ...
485
votes
15answers
493k 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 ...
466
votes
10answers
339k views

Get selected text from dropdownlist using jQuery

How can I get an ASP dropdownlist selected text in jQuery, not using the selected value?
466
votes
6answers
126k 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?
454
votes
11answers
365k 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(); ...
414
votes
20answers
483k views

How to get the current URL in jQuery?

I am using jQuery. I'd like to get the path of the current URL and assign it to a variable. Example URL: http://localhost/menuname.de?foo=bar&amp;number=0
412
votes
33answers
149k 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 ...
382
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 8744
15 30 50 per page