jquery how to the the value of id

supposed we have
<a href=# id="5"> hello world </a>

to get the value of id



jquery click() doesn’t work after dom update on ajax call.

<a class="clickme" href=#>clickme</a>

$('a.clickme').click(function(){ alert('hello')});

only work on DOM that already exists. it is not working.if the html above injected on existing DOM.
in this case you have to use.

$('a.clickme').live('click', function(){alert('hello')});

jquery live
jquery events not firing on dynamics


jquery click li to activate a

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

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

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


fix Firefox 3 & jquery bug

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="">


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

fix ff3 issues


FCKEditor the easy way

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