javascript - .bind() not working in firefox -


i have following simple javascript code wrote scroll terms , conditions textarea , after scroll reaches @ end of terms , conditions textarea should enabled accept checkbox , working in chrome not in ff , ie please .

javascript code:

    $('#blogger_agreement').bind('scroll', function()    { alert('hiii');      if($(this).scrolltop() + $(this).innerheight() >= $(this)[0].scrollheight)        {            $('#termsofservice').removeattr('disabled');        }     }); 

html :

<div class="control-group"> <label class="control-label"><br/>  </label> <div class="controls"> <textarea name="blogger_agreement"  id="blogger_agreement" class="deadline_date"  rows="15" cols="15" style="resize: none;background-color:white; overflow-y: scroll; height: 350px;" disabled > <?php  $file_handle = fopen(folder_path_http."terms_and_conditions.html", "r"); while (!feof($file_handle))  {    echo fgetss($file_handle); } fclose($file_handle);  ?> </textarea> </div> </div>  <div class="control-group">     <label class="control-label">         <input id="termsofservice" type="checkbox" name="termsofservice"  required="required" disabled="true" />      </label>     <div class="controls">         <div style="width:90%;float:left;margin-top:5px;">i accept terms , conditions of motherhood.</div>     </div> </div> 

from jquery 1.7 on preferred method of attaching event handlers:

$('#blogger_agreement').on('scroll', function() 

even so, should work. see fiddle works in chrome 33 , firefox 28 - alert called.

then see this fiddle similar yours, changes text. both work in chrome , firefox (at least me).

what version of jquery, chrome , firefox using?


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -