AmitDiwan has Published 11365 Articles

jQuery event.delegateTarget Property

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 13:04:43

95 Views

The event.delegateTarget property in jQuery is used to return the element where the currently-called jQuery event handler was attached.SyntaxThe syntax is as follows −event.delegateTargetExampleLet us now see an example to implement the jQuery event.delegateTarget property −    $(document).ready(function(){       $("div").on("click", "button", function(event){     ... Read More

jQuery event.data Property

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 13:01:32

179 Views

The event.data property in jQuery contains the optional data passed to an event method when the current executing handler is bound.SyntaxThe syntax is as follows −event.dataExampleLet us now see an example to implement the jQuery event.data property −    $(document).ready(function(){       $("p").each(function(i){     ... Read More

jQuery event.currentTarget Property

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:57:50

164 Views

The event.currentTarget property in jQuery is the current DOM element within the event bubbling phase.SyntaxThe syntax is as follows −event.currentTargetExampleLet us now see an example to implement the jQuery event.currentTarget property −    $(document).ready(function(){       $("h1, p").click(function(event){          alert(event.currentTarget === this); ... Read More

jQuery nextAll() method

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:54:02

105 Views

The nextAll() method in jQuery is used to return all next sibling elements of the selected element.ExampleLet us now see an example to implement the jQuery nextAll() method −    .demo * {       display: block;       border: 3px solid yellow;     ... Read More

jQuery next() method

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:50:49

173 Views

The next() selector in jQuery is used to return the next sibling element of the selected element.SyntaxThe syntax is as follows −$(selector).next(filter)Above, the parameter filter is a selector expression to narrow down the next sibling searchExampleLet us now see an example to implement the jQuery next() selector − ... Read More

jQuery contents()

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:47:11

110 Views

The contents() method in jQuery is used to return all direct children, including text and comment nodes, of the selected element.SyntaxThe syntax is as follows −$(selector).contents()ExampleLet us now see an example to implement the jQuery contents() method −    $(document).ready(function(){       $("button").click(function(){ ... Read More

jQuery children() method

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:44:49

134 Views

The children() method in jQuery is used to return all direct children of the selected element.ExampleLet us now see an example to implement the jQuery children() method −    .demo * {       display: block;       border: 2px solid blue;       ... Read More

jQuery add() method with Example

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:41:47

50 Views

The add() method in jQuery is used to add elements to an existing group of elements.SyntaxThe syntax is as follows −$(selector).add(ele, context)Above, ele is the selector expression, whereas context specifiesfrom where the selector expression should begin matching.ExampleLet us now see an example to implement the jQuery add() method − ... Read More

jQuery before() Method

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:37:45

123 Views

The before() method in jQuery is used to insert specified content before the selected elements.ExampleLet us now see an example to implement the before() method in jQuery −    $(document).ready(function(){       $("#btndemo").click(function(){          $("img").before("Text inserted before!");       });   ... Read More

jQuery after() method

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 12:34:08

166 Views

The after() method in jQuery is used to insert specified content after the selected elements.ExampleLet us now see an example to implement the jQuery after() method −    $(document).ready(function(){       $("#btndemo").click(function(){          $("img").after("Text inserted after!");       });    }); ... Read More

Advertisements