Modify ↓
Ticket #11158 (closed feature: invalid)
prop() could be used to get numeric values of css properties.
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
It would be quite useful to be able to retrieve the numeric value of a css property using the prop() function.
e.g.
$(div).css("margin-left"); //returns "385px"
$(div).prop("margin-left"); //would be nice to return "385"
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

And if there were DOM properties and CSS properties with the same name? This requires excessive levels of magic and do-what-I-thought-I-meant.