hi anakadote
<script type="text/javascript">
$(function(){
var element = $('#vstar')[0];
element.addEventListener('click',function(event) { say('Whee once!'); },false);
element.addEventListener('click',function(event) { say('Whee twice!'); },false);
element.addEventListener('click',function(event) { say('Whee three times!'); },false); });
function say(text) {
$('#console').append('<div>'+text+'</div>');
}
</script>
when i am using above script i used to get following output atleast in firefox browser
Whee once!
Whee twice!
Whee three times!
when i am using this script
<script type="text/javascript">
var counter=0;
$('#vstar').click(function(){
counter++;
if(counter==1)
say('Whee once!');
else if(counter==2)
say('Whee twice!');
else if(counter==3)
say('Whee three times!');
else
say('Whee '+counter+' times!')
});
function say(text) {
$('#console').append('<div>'+text+'</div>');
}
</script>
I am not even getting any message in IE browser. And i am getting error object does not support this property or method in ie. That is the problem so i have sent message the code is not working
thanks for your reply
thanks in advance