frist check this http://jsfiddle.net/jQFWM
.. this is working perfectly. but i don't want to
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#panel-1").slideToggle("slow");
$(this).toggleClass("active"); return false;
});
$(".btn-slide2").click(function(){
$("#panel-2").slideToggle("slow");
$(this).toggleClass("active"); return false;
});
$(".btn-slide3").click(function(){
$("#panel-3").slideToggle("slow");
$(this).toggleClass("active"); return false;
});
});
write like that. because i don't want to repate same code again and again. also in the future this panel and tiggering will be dynamic so it will be more than 3. so what is in my mind if i can trigger that by calling number say like 1, 2, 3 etc then can code will be small i guess. so guys any idea how ? like $("#panel+number")
http://jsfiddle.net/jQFWM/1
this one short code but not working.