javascript - JQuery $(this).attr("name") vs this.name -


what main different between

$(this).attr("name") 

and

this.name 

and technical explanation?

the first gets attribute value jquery object formed dom element. second gets property directly dom element, , therefore quicker. should use native properties possible.


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -