Archive for the ‘jquery’ Category

jquery click li to activate a

November 6, 2009

<ul class="menu">
<li><a href="/"> Home </a></li>
</ul>

to activate the link when user click on li

$('.menu li').click(function(e){
location.href = $(this).find('a').attr('href');
});

Now, user doesn’t have to click on the “Home” to activate the link.

jquery open new window on external links

September 30, 2009

$("a:not([href^='http://www.exampleuri.com']): not([href^='#']):not([href^='/'])").attr("target","_blank");

fix Firefox 3 & jquery bug

August 4, 2009

It is the problem when the $(document).ready() executed before the CSS loaded.
Make sure all CSS come before the scripts


<script type="text/javascript" src="">
<link rel="stylesheet" type="text/css" href="">

to


<link rel="stylesheet" type="text/css" href="">
<script type="text/javascript" src="">

fix ff3 issues

FCKEditor the easy way

January 6, 2009

fckeditor not that hard to install, but you may need some time to figure it out. Life is easier if you use FCKeditor jQuery way

alternate table row color. the easy way!

January 5, 2009

it is very simple using jQuery.


$(document).ready(function() {

$('table.zebra tr:odd').addClass('odd');
$('table.zebra tr:even').addClass('even');

});

of course you have to create two css class with the name even and odd.


jquery alternate table rows

tree color alternating pattern

imgAreaSelect

November 4, 2008