where can i get informations how styles are written in jquery.
for example it is not the normal way z-index it is zIndex... and so on..
fontWeight..
where can i get informations how styles are written in jquery.
for example it is not the normal way z-index it is zIndex... and so on..
fontWeight..
It's not jQuery, it's the way JavaScript handles it.
Here's a chart:
No need. You can use the CSS style.
$("#ID").css({
'z-index': 100,
'height': '100px'
});
It's very simple.
All dashes are replaced by camelCase.
Therefore, every time you see a dash, remove it and make the next letter upper case.
Alternatively, you can specify the styles as strings within the JSON keys, and use exactly the same names as CSS.
For example: { "z-index": 4, "background-color": "red" }
.
See here also. I have seen cases where the browser (Safari) will only accept it with hyphen...