Can not capture single click at onClick on Firefox
Dear list,
I have put these code up to make a simple test page.
<code> -------------------------------------------
<div class="answers" id="q2_1_8_1"
onclick="getReply('q2_1_8_1');">Answer 1<span class="true">True!</
span><span class="false">False</span></div>
</code> -------------------------------------------
When you click (yes single click) the text "Answer 1", the following
code fires.
<code>-------------------------------------------
var answers = new Array();
answers[ 'q2_1_8_1' ] = 'F';
function getReply( answer ) {
$( "#" + answer ).click( function(){
if ( answers[ answer ] == 'T' ) {
$( "div#" + answer +"> span.true" ).fadeIn( 50 );
} else {
$( "div#" + answer +"> span.false" ).fadeIn( 50 );
}
});
}
</code>-------------------------------------------
This code works well in IE7, but in Firefox 2 and Opera 9, this code
does not
capture the single click but capture the double click instead. So, an
anonymous
function executed by "click()" is the same as "dblclick()" in these
browsers I think.
Anyone faces with such a case?
Thanks for your advance.
-- philsci