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 […]

Jquery flip plugin – flip elements

While visiting site I saw one interesting jquery plugin. We can use this plugin for page or element flip. To use write script : $(“#flipbox”).flip({ direction:’tb’ }) To Change content : $(“#flipbox”).flip({ direction:’tb’, content:’this is my new content’ }) Options: contentdefine the new content of the flipped box. It works with: html, text or a jQuery object […]

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; […]

Welcome to my weblog

Hello and welcome to my weblog! Since this is my first entry. I intend to publish here the web design tips as well as sharing with you my thoughts on any tools or techniques I learn something about. Thanks for visiting and I hope you find something of value here.