i don’t know good title but heres the explain
i have this link
<a href="#" class="link" effect="show"> Link1 </a>
<a href="#" class="link" effect="fadeIn"> Link2 </a>
<a href="#" class="link" effect="slideDown"> Link2 </a>
i want if click .link use its effect meas
$('a').hide();
$('.link').click(function(){
var effect = $(this).attr("effect");
/*
what should i do here not conditions to make if effect is show show this link
if its fadeIn do fade in etc
*/
}) ;
This should work:
See http://jsfiddle.net/sGWr5/