Rewrite Jquery to Regular Javascript -


how rewrite below code in regular javascript. dont want load jquery library.

$(document).ready( function() { $('.navigation li').click(function() { $('.navigation li').removeclass('navactive'); $(this).addclass("navactive");     bgimage = $(this).find('a').attr('href').replace('#', '')+'.jpg';     $('.background').css("background-image", 'url(images/skins/'+bgimage+')'); }); }); 

the jquery library complex, , lot of stuff behind scenes. accurately answer question you'd need give bit more information, such as:

which browsers planning on supporting? jquery @ staying cross browser compatible, relies on hacky things this. ideally don't want include things in own code, it's better hide them away in library.

do have control on page? rewrite treat navigation control, have things image url in variable, rather having 'extract' <a /> tag?


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -