Help converting this piece of code from jQuery to plain javascript -
My website is trying to add dynamic limitations to the top, left, and right ... the pages on my site are dynamic. .. that they change ... I need a script that optimizes a div on the web page ...
Does anyone know this? I've got this script from some guy on this forum, but I'm trying to avoid jquery (not ask) ...
& lt; P class = "bgr" & gt; Content content content & lt; / P & gt; & Lt; Script type = "text / javascript" & gt; $ ('.bgr'). Each (function (I, L) {$ ('' ). Height ($ (this). Light () + 'px'). AppendTo ($ (this) ); // Top, Right and Bottom;}; & lt; / Script & gt; Calculating the dimensions in a cross-browser fashion (you're doing as altitude) (
< / Pre>
fitting and setting) is an incredibly difficult task in plain JavaScript, this is the reason that, other reasons In, why libraries like jQuery make up in the first place
I advise you strongly no without any framework to do it - if you do not like jQuery, right , But use any other.
Comments
Post a Comment