jQuery Cheat Sheet

jQuery is the most popular java script library is used in today. jQuery Visual Cheat Sheet is an useful guide are printable document, designed to provide a quick reference . These cheat sheets save your time and energy. jQuery 1.5 Visual Cheat Sheet Article : http://woorkup.com/2011/02/19/jquery-1-5-visual-cheat-sheet/ jQuery 1.3 cheat sheet wallpaper Article : http://www.gmtaz.com/jquery-13-cheatsheet-wallpaper/ jQuery […]

Popular Javascript frameworks

JavaScript is an object-oriented client-side scripting language. There are many Frameworks floating on the internet. Creating attractive websites with its awesome features, providing user interface developers using several javascript frameworks. There are some popular frameworks, which do you prefer? jQuery Dojotoolkit Developer.Yahoo Prototype JS Mootools ExtJS Adobe Spry-Ajax Framework JavaScriptMVC-javaScript Framework Sproutcore Qooxdoo Script.aculo.us Midori […]

jQuery – distinguish Chrome and Safari

I faced one situation in which I need to pass different value in chrome and safari. As both the browsers have exactly the same userAgent string, both are fully based on webkit. $(document).ready(function(){ $.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); if($.browser.chrome){ alert(“chrome”); userAgent = userAgent.substring(userAgent.indexOf(‘chrome/’) +7); userAgent = userAgent.substring(0,userAgent.indexOf(‘.’)); version = userAgent; } $.browser.safari = /safari/.test(navigator.userAgent.toLowerCase()); if($.browser.safari){ alert(“safari”); } […]

jQuery code to detect the browser

I am Using below jQuery code to detect the browser. It works well for IE, mozilla, Safari and opera browser /* ===== Firefox ===== */ // Select Firefox if (jQuery.browser.mozilla) { // do sth. } // Select Firefox 1.5.x to 2.x if (jQuery.browser.mozilla && jQuery.browser.version.substr(0, 3) == ‘1.8’) { // do sth. } // Select Firefox […]

jQuery – get index of Selected element

jQuery provides index() method to find out index of any element. This method return value is an integer indicating position of the element. $(document).ready(function(){    $(‘table tr’).mouseover(function(){        $(this).css(“cursor”,”pointer”);    });    $(‘table tr’).click(function(){        var index = $(‘table tr’).index(this);        alert(‘You Clicked row ‘ + index);     }); }); HTML: <table> <tr> <td>Row 1</td> </tr> <tr> <td>Row 2</td> </tr> <tr> <td>Row […]

css and jQuery ellipsis …

Today I learn a new thing css & jQuery ellipsis: overflow: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; white-space: nowrap; width: 100%; ————————- Above css not woks in Firefox so the best way is  jQuery script for the same. <html> <head> <title>CSS3 Text Overflow Test</title> <script type=”text/javascript” src=”jquery-1.3.1.js”></script> <script type=”text/javascript” src=”jquery.text-overflow.js”></script> <style type=”text/css”> .overflow { text-overflow: ellipsis; […]