Questionnez la Communauté
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( ... Voir Plus
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 ... Voir Plus
The difference between attributes and properties can be important in specific situations. Before jQuery1.6, the .attr() method sometimes took property values into account ... Voir Plus
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 ... Voir Plus
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 ... Voir Plus
.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 ... Voir Plus
I found a very good reply over internet: http://stackoverflow.com/questions/5874652/prop-vs-attr