How can I refresh a page with jQuery/Javascript?
-
zendnwar
-
May 21, 2014
-
Jquery, Others
-
0 Comments
It is very simple Javascript : <script type=”text/javascript”> setTimeout(function(){ window.location.reload(); }, 5000); </script> Jquery : $(‘#id’).click(function() { location.reload(); });
Continue Reading
Jquery addClass and removeClass
-
zendnwar
-
October 8, 2013
-
Jquery
-
3 Comments
Just see below code $(“.product-info”).click(function(){ if(!$(this).hasClass(“activeBar”)) { $(this).addClass(“activeBar”); } else { $(this).removeClass(“activeBar”); } }); Another example ; $(“.product-info”).click(function(){ $(this).toggleClass(“activeBar”); }); hope it will help you.
Continue Reading
Auto width and height in Jquery modal
-
zendnwar
-
October 4, 2013
-
Jquery
-
0 Comments
Just follow bellow code $(‘#your_id).dialog( { modal: true, height: ‘auto’, width: ‘auto’ }); Hope it will help you.
Continue Reading
Can not work Cancel button in Jquery fancybox
-
zendnwar
-
September 5, 2012
-
Jquery
-
0 Comments
Can not work Cancel button in Jquery fancybox parent.jQuery.fancybox.close() is a function add to Onclick. Hope it will work. <input type=button name=”cancel” value=”Cancel” onClick=”parent.jQuery.fancybox.close()”>
Continue Reading
Jquery Second Step
-
zendnwar
-
June 1, 2012
-
Jquery
-
0 Comments
<!doctype html> <html> <head> <meta charset=utf-8> <title>Second Step of Jquery</title> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js”></script> <style> .second_step { font-weight: bold; color: green; font-size: 24px;} </style> <script> $(document).ready(function() { $(‘li:first-child’).addClass(‘second_step’); }); </script> </head> <body> <ul> <li>Item-1</li> <li>Item-2</li> <li>Item-3</li> </ul> </body> </html> …………………………………………………………………………………………………………………………………………………………………… <title>Second Step of Jquery</title> // just title message. <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js”></script> // U can download ur jquery version from jquery main site. or …
Continue Reading
Jquery Basic Introduction
-
zendnwar
-
June 1, 2012
-
Jquery
-
0 Comments
An open source JavaScript library that simplifies the interaction between HTML and JavaScript Created by John Resig in 2005, released in January of 2006. jQuery is a lightweight “write less, do more” JavaScript library. The jQuery library contains the following features: HTML element selections HTML element manipulation CSS manipulation HTML event functions JavaScript Effects and animations HTML DOM traversal and …
Continue Reading
Jquery Tutorial First Step
-
zendnwar
-
June 1, 2012
-
Jquery
-
0 Comments
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <title>First Step of Jquery</title> <style> ul li { color: black; font-weight: bold; font-size: 18px; font-family: Verdana; } .first { color: green; } </style> </head> <body> <ul> <li>Item-1</li> <li>Item-2</li> <li>Item-3</li> </ul> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js”></script> <script> $(‘ul li’).addClass(‘first’); </script> </body> </html>
Continue Reading