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

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -