I'm using a jquery plugin that requires me to have inline styles. This is ok if I'm having styles for single viewport. In my case, I'm on a responsive design with media queries for different viewports which means the element style changes on each viewport. I want to pick the current style for the element and add to the style attribute at each viewport

Use jquery's .css() to get the current value of a style property for an element. Similarly, adjusting a style with .css() will apply it to the element as an inline style.
http://jsfiddle.net/QSg6k/1/

commented: Great! Thanks Evolution! +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.