Bug Tracker

Modify

Ticket #11158 (closed feature: invalid)

Opened 17 months ago

Last modified 17 months ago

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

comment:1 Changed 17 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.