Bug Tracker

Opened 8 years ago

Closed 8 years ago

#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:
Blocked by: Blocking:

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 (1)

comment:1 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.