I want know if this script is bad, not working for me :
jQuery(".template_content_img").css({
width: "50%",
height: "150px",
//// Here gives me error
font-size: "12px",
margin-bottom: "23px",
});
I don´t know if the problem it´s is "width:200px" or "width","150px"
These are my dudes, by another side I see also many people use animate for this and no use css but why do you suppose the animate create effect and transformation of divs and by this only I need change somethings but it's not working.
Regards !!!
Check jQuery .css documentation
jQuery(".template_content_img").css({
"width": "50%",
"height": "150px"
});
jQuery(".template_img").css({
"width": "70%",
"height": "100px"
});
EDIT: If you want add font-size or margin-bottom, just use classic CSS attributes/values
jQuery(".template_content_img").css({
"width": "50%",
"height": "150px"
"font-size": "12px",
"margin-bottom": "23px",
});
For multi-word CSS attributes, either use quotes:
"font-size": "12px",
or camelCase:
fontSize: "12px",
The object has to be a valid Javascript object literal, and delimiters like - are not allowed in unquoted property names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With