Is it possible to pass function as a value to all the css property? Refer the code here:
<script>
$("div").click(function() {
$(this).css({
width: function(index, value) {
return parseFloat(value) * 1.2;
},
height: function(index, value) {
return parseFloat(value) * 1.2;
}
});
});
</script>
I really dont have any clue why the above code is working.Can anyone explain advantages as well as disadvantages of passing function to properties?Also is this method of passing func tion applicable to all other css properties and non-css properties? plz help clarify in detail