scroll - How to put multiple style attributes in jquery -


this question has answer here:

$('#header').css('left', 200 - $this.scrollleft()); 

i need put multiple style attributes in above line. start , end part needs intact.

please help. in advance.

as explained in documentation, can pass object .css() function set styles multiple properties in single call. key name of property , value value set. example:

$('#header').css({     "left" : 200 - $this.scrollleft(),     "top" : 600 }); 

would set left value of 200 - $this.scrollleft(), , top 600.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -