AmitDiwan has Published 11365 Articles

jQuery closest() with Example

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:42:48

254 Views

The closest() method in jQuery is used to return the first ancestor of the selected element.SyntaxThe syntax is as follows −$(selector).closest(filter)ExampleLet us now see an example to implement the jQuery closest() method −    .demo * {       display: block;       border: 2px ... Read More

jQuery fadeIn() Method

AmitDiwan

AmitDiwan

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

242 Views

The fadeIn() method in jQuery is used to change the opacity, for selected elements, from hidden to visible.SyntaxThe syntax is as follows −$(selector).fadeIn(speed, easing, callback)ExampleAbove, speed is the speed of the fading effect. The easing can be swing or linear for speed at different animation points. Callback is the function ... Read More

jQuery attr() Method

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:36:10

211 Views

The attr() method in jQuery is used to set or return attributes and values of the selected elements.SyntaxThe syntax is as follows −$(selector).attr(attribute)ExampleLet us now see an example to implement the jQuery attr() method −    $(document).ready(function(){       $("button").click(function(){          alert("Input ... Read More

jQuery appendTo() with Example

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:25:53

418 Views

The appendTo() method in jQuery is used to insert HTML elements at the end of the selected elements.SyntaxThe syntax is as follows −$(content).appendTo(selector)Above, content is the content to be inserted.ExampleLet us now see an example to implement the jQuery appendTo() method −    $(document).ready(function(){     ... Read More

jQuery event.which property

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:23:56

144 Views

The event.which property in jQuery is used to return which keyboard key or mouse button was pressed for the event.SyntaxThe syntax is as follows −event.whichExampleLet us now see an example to implement the jQuery event.which property −    $(document).ready(function(){       $("input").keydown(function(event){       ... Read More

jQuery event.type property with Example

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:22:07

60 Views

The event.type property in jQuery is used to return which event type was triggered.SyntaxThe syntax is as follows −event.typeExampleLet us now see an example to implement the jQuery event.type property −    .demo {       color: blue;       background-color: orange;    }   ... Read More

jQuery event.timeStamp property with Example

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:18:25

246 Views

The event.timeStamp property in jQuery is used to return the number of milliseconds since January 1, 1970, when the event is triggered.SyntaxThe syntax is as follows −event.timeStampExampleLet us now see an example to implement the jQuery event.timeStamp property −    .demo {       color: white; ... Read More

jQuery event.result Property

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:16:27

68 Views

The event.result property in jQuery has the last/previous value returned by an event handler triggered by the specified event.SyntaxThe syntax is as follows −event.resultExampleLet us now see an example to implement the jQuery event.result property −    .demo {       color: orange;       ... Read More

jQuery event.relatedTarget Property

AmitDiwan

AmitDiwan

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

114 Views

The event.relatedTarget property in jQuery is used to return which element being entered or exited on mouse movement.SyntaxThe syntax is as follows −event.relatedTargetExampleLet us now see an example to implement the jQuery event.relatedTarget property −    .demo {       border:2px solid yellow;    } ... Read More

jQuery event.pageY property

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 11:10:51

90 Views

The event.pageY property in jQuery is used to return the position of the mouse pointer, relative to the top edge of the document.SyntaxThe syntax is as follows −event.pageYExampleLet us now see an example to implement the jQuery event.pageY property −    $(document).ready(function(){       $(document).mousemove(function(event){ ... Read More

Advertisements