I’m basically trying to save all current css properties of an element in a local var/array.
I tried :
el.css();
and
el.css("*");
With no luck.
Is there any quick tip do to so ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i have updated the answer to be more efficent also providing a working demo…
the problem when getting the style of an element is that you don’t get just setted value but also the default values. with this code i’m trying to get just the setted values of an element. this work both with
inlinestyle as well as with<style>and<link>