How to Get the Size of the Viewport Using jQuery
Sometimes you will need to get the width and height of a window. To do that, you would use jQuery(window).width(); jQuery(window).height(); This is useful on page load, if you wanted…
All Posts filed under jQuery
Sometimes you will need to get the width and height of a window. To do that, you would use jQuery(window).width(); jQuery(window).height(); This is useful on page load, if you wanted…
There are times when you will want to have something happen after X amount of seconds. To do this you would use: window.setTimeout(function(){ // Code here }, 5000 ); //…
Setting a background with jQuery can be done with the following code: jQuery(element).css(‘background-image’, ‘url(“‘ + image-URL + ‘”)’);
Sometimes you want to delay submitting a form until you can check it via jQuery and if it all looks valid, then submit the form. To submit a form using…
A lot of times when a page is loaded, you will want to wait to do anything until the user interacts with an element, like submitting a form. Other times,…
There are times when you want to get the value of a form element using jQuery. You can do that with: jQuery(element).val(); Now if you want to set the value…
Sometimes you will want to change the href portion of a link depending on a number of factors. This can be done using jQuery: jQuery(element).attr(“href”, “https://www.bigappledesigns.com/”);
There are a few ways of setting a checkbox to checked. If you are using jQuery 1.6 and greater, then you should use: jQuery(element).prop(‘checked’, true); Since the .prop method did…
Checking whether a checkbox is checked or not could come in handy if you want to show additional fields related to it. To check if it is checked or not:…
Redirecting in Javascript can be useful after checking form data, but how do we do it? We can do it with pure Javascript like this: window.location.href = “https://www.bigappledesigns.com”; If for…
Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001