This is a static method of the jQuery library that takes two parameters.
(A static method is the one that does not need a selector to call the method, only the jQuery name or its shortcut $.)
It checks all the child elements of the first parameter, seeing whether it contains the second parameter.
$.contains(this, document.getElementById("has_discount"))
$(<selector>).each(function() {})
.each uses the selector that calls it and creates an array of elements identified by that selector. It then loops through each element in the array sequentially.
live/delegate/on
If you know a head of time that your element will behave like some other elements already created, use the live method. This will attach a handler to the event for all elements that match the current selector, now and in the future.
This will work for elements that have not yet been added to the DOM.
slideUp
slideDown
slideToggle
fadeIn





No comments:
Post a Comment