Hello,
 
I am writing a jquery script.  It works fine in firefox, but in IE when
I bind a function to click it causes that function to trigger.  Here is
part of the code.  The faqLoad function fires on page load.  If I
remember correctly this happened with I used click instead of bind.
 
Any help would be appreciated.
 
John
 
 
function faqExpand(){
$(this).find("img").attr("src","http://www.ptclinic.com/faq/minus.gif";);
$(this).next().slideDown("normal").animateColor(1500,
{backgroundColor:['#ff0','#fff']});
$(this).unbind("click");
$(this).bind("click",faqCollapse);
$(this).attr("title","Collapse Answer");
return false;
};
 
function faqCollapse(){
$(this).find("img").attr("src","http://www.ptclinic.com/faq/plus.gif";);
$(this).next().slideUp("normal");
$(this).unbind("click").bind("click",faqExpand);
$(this).attr("title","Expand Answer");
return false;
};

function faqLoad(){
$(".faqanswer").hide();
$(".question").bind("click",faqExpand);
$(".question").hover(function(){$(this).addClass("over");},function(){$(
this).removeClass("over");});
$("#faqTitle").after("<h5 style='text-align:center;'>(Click on a
Question to view the Answer)</h5>");
};
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to