I'm starting in jQuery, how can I select an object JQuery?
This code:
& lt; Script type = "text / javascript" language = "javascript" & gt; Hide function (sender id) {$ ("#" + Sender ID). Hyde (200); // This exception is thrown / Microsoft JScript runtime error: Object expected} "div1" onclick = "javascript: hide (this.id)"
Get a function from an ID Use the id to get the element Do this: just pass the element. Do not live in front of an internal phenomenon, it does not mean what you think it means. Do not use internal incident attributes for that case (though I have not corrected it in this example). Use the. Avoid incidents that triggered clicks on a div; It is a focus-based navigation device (such as the key on the keyboard and used by people with disabilities, without the use of new features introduced in HTML5 Can not be targeted with the use of many devices to be made), which are not yet able to see comprehensive support. Use an element that is designed as an interaction control (such as a button). (Not specified in the example below) Example:
Hide function (Sender) {$ (Sender). Hull (200); } & Lt; Div id = "div1" onclick = "hide (this)"
Comments
Post a Comment