Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the -webkit-transition-duration property with jQuery?

Since this sets the transition duration to 1 second: $('#objectID').css('webkit-transition-duration','1s');

I assumed this would return the current duration value: $('#objectID').css('webkit-transition-duration');

but it does not.

like image 606
narrowdesign Avatar asked Mar 07 '12 18:03

narrowdesign


People also ask

What is the jQuery property?

jQuery prop() MethodThe prop() method sets or returns properties and values of the selected elements. When this method is used to return the property value, it returns the value of the FIRST matched element.

How get data attribute value in jQuery?

To retrieve a data-* attribute value as an unconverted string, use the attr() method. Since jQuery 1.6, dashes in data-* attribute names have been processed in alignment with the HTML dataset API. $( "div" ).

What is $() in jQuery?

In the first formulation listed above, jQuery() — which can also be written as $() — searches through the DOM for any elements that match the provided selector and creates a new jQuery object that references these elements: 1. $( "div.


1 Answers

Try with:

$('#objectID').css('transition-duration','1s');

$('#objectID').css('transition-duration');
like image 120
Nicocube Avatar answered Sep 27 '22 00:09

Nicocube