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.
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.
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" ).
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.
Try with:
$('#objectID').css('transition-duration','1s');
$('#objectID').css('transition-duration');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With