jquery - Button fixed position -


i fix position of button, cause when click function showcontacts loads , display contacts list on screen , button go footer page;

<button class = "btn" type="button" id='button1' style="visibility: hidden" onclick = "showcontacts()">show contacts</button> 

first things first, question tagged incorrect. has nothing jquery.

to fix button, add example following css:

.btn{   position: fixed;   left: 0;   top: 0: } 

which fix upper left corner of page.

i recommend learn css first

further reading:

mdn css position

edit:

you could, however, accomplish using jquery:

$('.btn').css({   'position':'fixed',   // more rules ); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -