jquery - Bootstrap fixed footer moves -
i developing application angular js, bootstrap , jquery. have created fixed footer works expected throughout application. when click on input box on mobile browser footer moves screen center.
here css :
.footer{ bottom: 0; padding: 10px 15px; position: fixed; width: 100%; } i tried changing footer properties position:absolute , display:none on input focus. here code :
$(document).on('focus', '[type=text], [type=password], [type=number]', function (e) { $(".footer").css("position","absolute"); $(".footer").css("display","none"); }); $(document).on('blur', '[type=text], [type=password], [type=number]', function (e) { $(".footer").css("position","fixed"); $(".footer").css("display","block"); }); it works on few devices iphone 5 , 5s no success on others ipad, iphone 4 etc. appreciated.
i find footers position: fixed don't behave way like. don't know how build html consider using position: absolute.
in pen below made small example of when need fixed footer @ bottom of page.
https://codepen.io/rennie/pen/dvvggj
i not recommend using javascript/jquery fix styling issue, not jquery since not 'angular way'. see "thinking in angularjs" if have jquery background? why.
Comments
Post a Comment