Automatic ajax call using jQuery

Total used files : index.php jquery.js random.php I am using jQuery’s setInterval() method to automatically make the ajax call in every 2 seconds. index.php [sourcecode language=”php” highlight=”11,13,17″] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Refresh Page itself</title> <script type="text/javascript" src="jquery.js"></script> <script> $(document).ready(function(){ var callAjax = function(){ $.ajax({ method:’get’, url:’random.php’, success:function(data){ $("#sample").html(data); } }); … Continue reading “Automatic ajax call using jQuery”

[jQuery] Retrieve the Value of Selection Box

Here is a simple jQuery tutorial to retrieve the content of the value of Selection Box. Screenshot of Selection Box Layout Here is the code snippet for the above screenshot. Create this folder structure, these all are placed in a same folder ► CSS [directory] →  style.css ►  JS [directory] → jquery.js → remote.js ► … Continue reading “[jQuery] Retrieve the Value of Selection Box”

[Tutorial] Create Collapsable and Expandable Fixed jQuery Modal Box

Today I am going to write a tutorial on how to write a Jquery enabled Collapsable and Expandable Fixed jQuery Modal Box. Q. What is jQuery ? A. jQuery is a new type of Javascript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions … Continue reading “[Tutorial] Create Collapsable and Expandable Fixed jQuery Modal Box”

[Tutorial] Collapsable and Expandable jQuery Fixed Modal Box (Continue…)

Collapsable and Expandable jQuery Fixed Modal Box (Continue…) Our Jquery Code that actually does the binding for click events and adjusting the CSS dynamically. jq-fixed.js $(document).ready(function() { //Initialize our jquery actions initialposition(); //If user decides to make no action $(“#mask”).click(function(e){ $(this).hide(); resetmask(); }); function initialposition() { //position the navigation bar at top initially // when … Continue reading “[Tutorial] Collapsable and Expandable jQuery Fixed Modal Box (Continue…)”