My javascript function is not get called , but it get called when i open the console window by inspect->console
when this was opened ,on that time , my javascript onclick function was getting called perfectly and my code on that function gets executed
but without opening my console log tab (inspect->console) , on that case it is not getting called
my code:
<%= form.check_box 'active', :class=>"icheck", :"data-checkbox" => "icheck_val_box", :onclick =>"clickfun()" %>
<%= form.label 'active', 'mybooklib'%>
the function
function clickfun(){
$("#savebookicon").attr("disabled",true);
});
but this clickfun funciton is only working if my console log window was opened,
this was new kind of error to me, i didnt came accross this kind of error so can anyone help meout?