jquery Programming Glossary: explanation
What CSS3 selectors does jQuery really support, e.g. :nth-last-child()? http://stackoverflow.com/questions/11745274/what-css3-selectors-does-jquery-really-support-e-g-nth-last-child enter and leave these states. See this answer for an explanation. jQuery is also unable to resolve namespace prefixes since it..
If a DOM Element is removed, are its listeners also removed from memory? http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory they were attached to. If you want a more in depth explanation of the causes patterns and solutions used to fix IE memory leaks..
Persisting the changes of range objects after selection in HTML http://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html made should be reflected in the HTML page. EDIT Detailed explanation. When the HTML page is loaded the text is selected and highlighted..
Turn a number into star rating display using jQuery and CSS http://stackoverflow.com/questions/1987524/turn-a-number-into-star-rating-display-using-jquery-and-css give it a float and it'll give you your stars. A small explanation on how the stars are presented might be in order. The script..
JQuery How to Uncheck A radio button http://stackoverflow.com/questions/2117538/jquery-how-to-uncheck-a-radio-button .attr 'checked' false See jQuery prop help page for an explanation on the difference between attr and prop and why prop is now..
jQuery :contains selector to search for multiple strings http://stackoverflow.com/questions/2416803/jquery-contains-selector-to-search-for-multiple-strings more something like 'li contains Mary contains John ' . explanation Just think of contains just as it wass .someClass 'li.classone..
What does (function($) {})(jQuery); mean? http://stackoverflow.com/questions/2937227/what-does-function-jquery-mean Can someone tell me a little more about these Perhaps an explanation will come in handy someday when writing a framework What does..
Jquery $.ajax fails in IE on cross domain calls http://stackoverflow.com/questions/3362474/jquery-ajax-fails-in-ie-on-cross-domain-calls allow cross domain requests See this microsoft page for an explanation. OTOH this page mentions that IE7 and eariler cannot do cross..
Dealing with overlapping jQuery sortable lists http://stackoverflow.com/questions/4092817/dealing-with-overlapping-jquery-sortable-lists generic without too much effort. Firstly here's the code explanation below html head script type text javascript src http ajax.googleapis.com..
How to load images dynamically (or lazily) when users scrolls them into view http://stackoverflow.com/questions/5117421/how-to-load-images-dynamically-or-lazily-when-users-scrolls-them-into-view EDIT How do these plugins work This is a simplified explanation Find window size and find the position of all images and their..
Looking for jQuery easing functions without using a plugin http://stackoverflow.com/questions/5207301/looking-for-jquery-easing-functions-without-using-a-plugin have some options. In lieu of of other functions a brief explanation of how this one operates and might be modified would be awesome...
Limiting number of lines in textarea http://stackoverflow.com/questions/556767/limiting-number-of-lines-in-textarea return limitLines this event textarea body html Edit explanation It catches the keypress if the ENTER key is pressed and just..
Does using $this instead of $(this) provide a performance enhancement? http://stackoverflow.com/questions/5724400/does-using-this-instead-of-this-provide-a-performance-enhancement wise using example two than example one maybe with an explanation why or why not EDIT NOTE I suspect that two is better one what..
jQuery.getJSON - Access-Control-Allow-Origin Issue http://stackoverflow.com/questions/6396623/jquery-getjson-access-control-allow-origin-issue well want to use JSON P instead see below . First a quick explanation. The header you've mentioned is from the Cross Origin Resource..
“How” to save an entire collection in Backbone.js - Backbone.sync or jQuery.ajax? http://stackoverflow.com/questions/6879138/how-to-save-an-entire-collection-in-backbone-js-backbone-sync-or-jquery-ajax it in English. It'd be great to have a javascript specific explanation Say I have a collection of models the models themselves may..
jqGrid iterate over the grid Data in a subgrid http://stackoverflow.com/questions/7080859/jqgrid-iterate-over-the-grid-data-in-a-subgrid have an interest only in the result code and not in the explanation you can skip the part of my answer. The main idea is that '#grid'..
jQuery/JavaScript “this” pointer confusion http://stackoverflow.com/questions/710542/jquery-javascript-this-pointer-confusion in prototype to support scoping. For more info Good explanation on scoping Extending jQuery bind to supportscoping share improve..
how does jquery chaining work? http://stackoverflow.com/questions/7475336/how-does-jquery-chaining-work sure there is someone out there that can provide me with a explanation that allows me to understand how chaining works. Thanks javascript..
Listening for Youtube Event in JavaScript or jQuery http://stackoverflow.com/questions/7988476/listening-for-youtube-event-in-javascript-or-jquery
Combining jQuery Isotope and Lazy Load http://stackoverflow.com/questions/11337291/combining-jquery-isotope-and-lazy-load imgs.lazyload failure_limit Math.max imgs.length 1 0 Explanation According to the docs http www.appelsiini.net projects lazyload..
Show/Hide span on the same spot http://stackoverflow.com/questions/13124300/show-hide-span-on-the-same-spot this .parent .parent a.show_hide .click return false Explanation the script will append the span to the anchor on click and will..
Hide redundant error message in ASP.Net ValidationSummary http://stackoverflow.com/questions/13565718/hide-redundant-error-message-in-asp-net-validationsummary you have ClientIDMode Static on your ValidationSummary Explanation It uses JQuery to remove all but the first li in the ValidationSummary..
jQuery: Why use document.ready if external JS at bottom of page? http://stackoverflow.com/questions/1438883/jquery-why-use-document-ready-if-external-js-at-bottom-of-page bottom of the page No you do not need document .ready . Explanation without the aid of onload related implementations like document..
Check if object is a jQuery object http://stackoverflow.com/questions/1853223/check-if-object-is-a-jquery-object You can use the instanceof operator obj instanceof jQuery Explanation the jQuery function aka is implemented as a constructor function..
JQuery Form Plugin File Upload using POST redirects to POST response http://stackoverflow.com/questions/20729645/jquery-form-plugin-file-upload-using-post-redirects-to-post-response x .fail function data var x JSON.parse data alert Error x Explanation Since you want to call a jQuery plugin you need a jQuery object..
jQuery animate background position in chunks? http://stackoverflow.com/questions/2404332/jquery-animate-background-position-in-chunks of the need to animate two values instead of just one. Explanation and solution here http snook.ca archives javascript jquery bg..
JQuery: Remove duplicate elements? http://stackoverflow.com/questions/2822962/jquery-remove-duplicate-elements txt this .text if seen txt this .remove else seen txt true Explanation seen is an object which maps any previously seen text to true..
How to create flashing page title effect like facebook? http://stackoverflow.com/questions/3381462/how-to-create-flashing-page-title-effect-like-facebook of the arrival of new message giving a flashing effect. Explanation by AdrianoKF Notice the window title cycling between something..
How can I detect when a new element has been added to the document in jquery? http://stackoverflow.com/questions/4780822/how-can-i-detect-when-a-new-element-has-been-added-to-the-document-in-jquery a new element has been added to the document in jquery Explanation I want to know when an element with class column header has..
jquery.form and cross-domain requests http://stackoverflow.com/questions/5066213/jquery-form-and-cross-domain-requests issues with Firefox and Chrome didn't even try IE yet . Explanation my whole site is located inside http www.mysite.com . However..
jquery .bind() and/or .ready() not working http://stackoverflow.com/questions/6195169/jquery-bind-and-or-ready-not-working whatever init returns. Try this document .ready init Explanation When you were trying to pass the function you were actually..
duplicate image with slightly different name http://stackoverflow.com/questions/6549817/duplicate-image-with-slightly-different-name img zoom pan' http jsfiddle.net jasongennaro TUzNF 3 Explanation get the first instance of the img necessary since you will be..
Issues Setting Value/Label Using DropKick Javascript http://stackoverflow.com/questions/9857771/issues-setting-value-label-using-dropkick-javascript in your case change button. So this is what I have done Explanation if you interested I used firebug to inspect the variable and..
What CSS3 selectors does jQuery really support, e.g. :nth-last-child()? http://stackoverflow.com/questions/11745274/what-css3-selectors-does-jquery-really-support-e-g-nth-last-child handlers rather than pseudo classes to run code when elements enter and leave these states. See this answer for an explanation. jQuery is also unable to resolve namespace prefixes since it does not support namespacing in CSS . The following level..
If a DOM Element is removed, are its listeners also removed from memory? http://stackoverflow.com/questions/12528049/if-a-dom-element-is-removed-are-its-listeners-also-removed-from-memory due to event listeners keeping hold of references to the elements they were attached to. If you want a more in depth explanation of the causes patterns and solutions used to fix IE memory leaks I fully recommend you read this MSDN article on Understanding..
Persisting the changes of range objects after selection in HTML http://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html multiple tags so that when it is loaded again the changes made should be reflected in the HTML page. EDIT Detailed explanation. When the HTML page is loaded the text is selected and highlighted using the range object and the executeCommand document.execCommand..
Turn a number into star rating display using jQuery and CSS http://stackoverflow.com/questions/1987524/turn-a-number-into-star-rating-display-using-jquery-and-css have to calculate any three quarter or whatnot star widths just give it a float and it'll give you your stars. A small explanation on how the stars are presented might be in order. The script creates two block level span elements. Both of the spans initally..
JQuery How to Uncheck A radio button http://stackoverflow.com/questions/2117538/jquery-how-to-uncheck-a-radio-button 'checked' false Note that the pre jQuery 1.6 idiom was this .attr 'checked' false See jQuery prop help page for an explanation on the difference between attr and prop and why prop is now preferable. prop was introduced with jQuery 1.6 in May 2011...
jQuery :contains selector to search for multiple strings http://stackoverflow.com/questions/2416803/jquery-contains-selector-to-search-for-multiple-strings contains share improve this question answer I think it's more something like 'li contains Mary contains John ' . explanation Just think of contains just as it wass .someClass 'li.classone li.classtwo' . you want either classone OR classtwo 'li.classone.classtwo'..
What does (function($) {})(jQuery); mean? http://stackoverflow.com/questions/2937227/what-does-function-jquery-mean into all my plugins without actually knowing what it means. Can someone tell me a little more about these Perhaps an explanation will come in handy someday when writing a framework What does this do I know it extends jQuery somehow but is there anything..
Jquery $.ajax fails in IE on cross domain calls http://stackoverflow.com/questions/3362474/jquery-ajax-fails-in-ie-on-cross-domain-calls problem with IE relies on not defining security zones to allow cross domain requests See this microsoft page for an explanation. OTOH this page mentions that IE7 and eariler cannot do cross domain calls but IE8 can using a different object than XMLHttpRequest..
Dealing with overlapping jQuery sortable lists http://stackoverflow.com/questions/4092817/dealing-with-overlapping-jquery-sortable-lists time constraints but you should be able to make it completely generic without too much effort. Firstly here's the code explanation below html head script type text javascript src http ajax.googleapis.com ajax libs jquery 1.4.4 jquery.min.js script script..
How to load images dynamically (or lazily) when users scrolls them into view http://stackoverflow.com/questions/5117421/how-to-load-images-dynamically-or-lazily-when-users-scrolls-them-into-view Demo http www.appelsiini.net projects lazyload enabled.html EDIT How do these plugins work This is a simplified explanation Find window size and find the position of all images and their sizes If the image is not within the window size replace..
Looking for jQuery easing functions without using a plugin http://stackoverflow.com/questions/5207301/looking-for-jquery-easing-functions-without-using-a-plugin little bounce but I'm looking for a few others just so I can have some options. In lieu of of other functions a brief explanation of how this one operates and might be modified would be awesome. Thank you Example .easing.custom function x t b c d var..
Limiting number of lines in textarea http://stackoverflow.com/questions/556767/limiting-number-of-lines-in-textarea return false else lines script textarea rows 4 onkeydown return limitLines this event textarea body html Edit explanation It catches the keypress if the ENTER key is pressed and just doesn't add a new line if the lines in the textarea are the..
Does using $this instead of $(this) provide a performance enhancement? http://stackoverflow.com/questions/5724400/does-using-this-instead-of-this-provide-a-performance-enhancement than once twice three times or more. Am I better off performance wise using example two than example one maybe with an explanation why or why not EDIT NOTE I suspect that two is better one what I was a little fearful of was peppering my code with this..
jQuery.getJSON - Access-Control-Allow-Origin Issue http://stackoverflow.com/questions/6396623/jquery-getjson-access-control-allow-origin-issue access control share improve this question You may well want to use JSON P instead see below . First a quick explanation. The header you've mentioned is from the Cross Origin Resource Sharing standard. Beware that it is not supported by some..
“How” to save an entire collection in Backbone.js - Backbone.sync or jQuery.ajax? http://stackoverflow.com/questions/6879138/how-to-save-an-entire-collection-in-backbone-js-backbone-sync-or-jquery-ajax clear exactly how is it written in code the post explains it in English. It'd be great to have a javascript specific explanation Say I have a collection of models the models themselves may have nested collections. I have overridden the toJSON method..
jqGrid iterate over the grid Data in a subgrid http://stackoverflow.com/questions/7080859/jqgrid-iterate-over-the-grid-data-in-a-subgrid questions and explain why I think it's the best way. If you have an interest only in the result code and not in the explanation you can skip the part of my answer. The main idea is that '#grid' is a jQuery wrapper to the HTML DOM table object . The..
jQuery/JavaScript “this” pointer confusion http://stackoverflow.com/questions/710542/jquery-javascript-this-pointer-confusion
how does jquery chaining work? http://stackoverflow.com/questions/7475336/how-does-jquery-chaining-work us to much abstraction for a novice programer like me I'm sure there is someone out there that can provide me with a explanation that allows me to understand how chaining works. Thanks javascript jquery frameworks share improve this question If..
Listening for Youtube Event in JavaScript or jQuery http://stackoverflow.com/questions/7988476/listening-for-youtube-event-in-javascript-or-jquery
Combining jQuery Isotope and Lazy Load http://stackoverflow.com/questions/11337291/combining-jquery-isotope-and-lazy-load imgs img.lazy con.isotope onLayout function win.trigger scroll imgs.lazyload failure_limit Math.max imgs.length 1 0 Explanation According to the docs http www.appelsiini.net projects lazyload After scrolling page Lazy Load loops though unloaded images...
Show/Hide span on the same spot http://stackoverflow.com/questions/13124300/show-hide-span-on-the-same-spot return false '.show_hide_close' .click function this .parent .parent a.show_hide .click return false Explanation the script will append the span to the anchor on click and will move it back to its original place on closing. the reason..
Hide redundant error message in ASP.Net ValidationSummary http://stackoverflow.com/questions/13565718/hide-redundant-error-message-in-asp-net-validationsummary Text Save OnClientClick submitValidate And finaly make sure you have ClientIDMode Static on your ValidationSummary Explanation It uses JQuery to remove all but the first li in the ValidationSummary which is actually an UnorderedList e.g. ul . I put..
jQuery: Why use document.ready if external JS at bottom of page? http://stackoverflow.com/questions/1438883/jquery-why-use-document-ready-if-external-js-at-bottom-of-page question if you include your DOM referencing scripts at the bottom of the page No you do not need document .ready . Explanation without the aid of onload related implementations like document .ready the rule of thumb is any code that interacts with..
Check if object is a jQuery object http://stackoverflow.com/questions/1853223/check-if-object-is-a-jquery-object 'jquery' javascript jquery share improve this question You can use the instanceof operator obj instanceof jQuery Explanation the jQuery function aka is implemented as a constructor function . Constructor functions are to be called with the new prefix...
JQuery Form Plugin File Upload using POST redirects to POST response http://stackoverflow.com/questions/20729645/jquery-form-plugin-file-upload-using-post-redirects-to-post-response .done function data var x JSON.parse data alert Success x .fail function data var x JSON.parse data alert Error x Explanation Since you want to call a jQuery plugin you need a jQuery object hence this . ajaxSubmit does not need any arguments you..
jQuery animate background position in chunks? http://stackoverflow.com/questions/2404332/jquery-animate-background-position-in-chunks
JQuery: Remove duplicate elements? http://stackoverflow.com/questions/2822962/jquery-remove-duplicate-elements improve this question var seen 'a' .each function var txt this .text if seen txt this .remove else seen txt true Explanation seen is an object which maps any previously seen text to true . It functions as a set containing all previously seen texts...
How to create flashing page title effect like facebook? http://stackoverflow.com/questions/3381462/how-to-create-flashing-page-title-effect-like-facebook switch between the original title and a message informing user of the arrival of new message giving a flashing effect. Explanation by AdrianoKF Notice the window title cycling between something like New message from Foo Bar and the regular one after receiving..
How can I detect when a new element has been added to the document in jquery? http://stackoverflow.com/questions/4780822/how-can-i-detect-when-a-new-element-has-been-added-to-the-document-in-jquery has been added to the document in jquery How can I detect when a new element has been added to the document in jquery Explanation I want to know when an element with class column header has been added to the document. As I plan to run some javascript..
jquery.form and cross-domain requests http://stackoverflow.com/questions/5066213/jquery-form-and-cross-domain-requests to make jquery.form with a cross domain request. I'm having issues with Firefox and Chrome didn't even try IE yet . Explanation my whole site is located inside http www.mysite.com . However my contact form is on another server referenced by http contact.mysite.com..
jquery .bind() and/or .ready() not working http://stackoverflow.com/questions/6195169/jquery-bind-and-or-ready-not-working You aren't passing init to document .ready you're passing whatever init returns. Try this document .ready init Explanation When you were trying to pass the function you were actually running it. At the time of you running it the DOM wasn't ready..
duplicate image with slightly different name http://stackoverflow.com/questions/6549817/duplicate-image-with-slightly-different-name ' 1.jpg' ' 2.jpg' ' img src ' src2 ' ' .appendTo 'a.slashc img zoom pan' http jsfiddle.net jasongennaro TUzNF 3 Explanation get the first instance of the img necessary since you will be creating a second grab the src text replace the end bit add..
Issues Setting Value/Label Using DropKick Javascript http://stackoverflow.com/questions/9857771/issues-setting-value-label-using-dropkick-javascript within select and not from external element binding. i.e. in your case change button. So this is what I have done Explanation if you interested I used firebug to inspect the variable and found that dropkick marshal your existing select with nice..
|