Kristi Castro has Published 98 Articles

How to call a jQuery function after a certain delay?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 08:02:01

5K+ Views

To call a jQuery function after a certain delay, use the siteTimeout() method. Here, jQuery fadeOut() function is called after some seconds.You can try to run the following code to learn how to work with setTimeout() method in jQuery to call a jQuery function after a delay −ExampleLive Demo ... Read More

How to know which key was pressed in a form input using jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:48:16

288 Views

To know which key was pressed in a form input using jQuery, use the jQuery keydown event. You can try to run the following code to learn how to detect key pressed in a form input −ExampleLive Demo               $(document).ready(function(){ ... Read More

How to detect pressing Enter on keyboard using jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:46:52

290 Views

To detect pressing Enter on keyboard, use the keup() function with keyCode. You can try to run the following code to learn how to detect pressing Enter on keyboard using jQuery −ExampleLive Demo                          $(document).ready(function(){     ... Read More

How to validate email using jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:36:39

11K+ Views

To validate email using jQuery, use the regex pattern. You can try to run the following code to learn how to validate email using jQuery −ExampleLive Demo               $(document).ready(function() {       $('.error').hide();       $('#submit').click(function(){     ... Read More

How to select ALL children (in any level) from a parent in jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:35:38

770 Views

To select all children from a parent in jQuery, use the find() method. You can try to run the following code to select ALL children in any level −ExampleLive Demo        .myclass * {      display: block;      border: 2px solid lightgrey;   ... Read More

Why do we use JSON.stringify() method in jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:32:07

418 Views

JSON or JavaScript Object Notation is a lightweight text-based open standard designed for human-readable data interchange. Use the JSON.stringify() method to convert a JavaScript object into a string.You can try to run the following code to learn how to work with JSON.stringify() method −ExampleLive Demo JSON string ... Read More

How to increase the duration of jQuery effects?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:31:03

226 Views

To increase the duration of jQuery effects, set the optional speed parameter. The values include, slow, fast, milliseconds, etc. The fast value is used to increase the duration.Let us see an example with fadeIn() jQuery method. The fadeIn( ) method fades in all matched elements by adjusting their opacity and ... Read More

How to adjust the height of iframe based on the loaded content using jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:25:20

2K+ Views

To adjust the height of iframe, use the jQuery height() method. You can try to run the following code to adjust height of iframe dynamically on button click:ExampleLive Demo                 $(document).ready(function(){         $("button").click(function(){           $("iframe").height(300);         });       });             Change Height

How does $('iframe').ready() method work in jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:24:24

2K+ Views

Here’s an example wherein the iframe size is larger than the page. We will scroll to the top of the page whenever the iframe loads using jQuery −ExampleLive Demo               $(document).ready(function(){       $("button").click(function(){         $('iframe').ready(function(){           $(window).scrollTop(0);         });       });    });           Loop through each image

How to loop through all the iframes elements of a page using jQuery?

Kristi Castro

Kristi Castro

Updated on 20-Jun-2020 07:22:57

989 Views

To loop through all the iframes element of a page, use the jQuery each() method. You can try to run the following code to learn how to loop through all iframes. We have created three iframes below −ExampleLive Demo $(document).ready(function(){   $("button").click(function(){     $("iframe").each(function(){   ... Read More

Previous 1 ... 4 5 6 7 8 ... 10 Next
Advertisements