Ask the Community
Ask any professional question and get answers from other specialists.
$(selector).click(function(){ //instead of: this.getAttribute('style'); //do i use: $(this).prop('style'); //or: $(this).attr( ... See More
so prop() is jquery1.6+ alternative for the .attr(), in terms of concept they do the same, but each is for a different version,we upgraded lately to jquery1.8 and found t ... See More
The difference between attributes and properties can be important in specific situations. Before jQuery1.6, the .attr() method sometimes took property values into account ... See More
The link that Muhammad Majid Saleem provided explains a lot as far as the difference is concerned. I'll just like to add one advise to help you out incase such funct ... See More
If you are trying to get the values then you should better go for "attr()" Even this can be used to set the values as well, Like if you want to set your valu ... See More
.prop() as the name indicates refers to the properties while .attr() refers to an element's attributes. Both of them can be used interchangeably for most of the case ... See More
I found a very good reply over internet: http://stackoverflow.com/questions/5874652/prop-vs-attr