Darksat IT Security Forums
January 15, 2026, 12:01:14 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Darksat IT Security Forum
From Firewall Support, AntiVirus Questions, Spyware problems, Linux and Windows Security, Black Hat SEO right down to Website Design and Multimedia
 
  Home Help Search Gallery Links Staff List Login Register  

Nice Javascript examples

Pages: [1]
  Print  
Author Topic: Nice Javascript examples  (Read 1926 times)
Defcon 5
Master
*****
Posts: 2410



View Profile WWW
« on: September 05, 2009, 08:05:39 am »

At the moment I am developing a library, which is kinda based upon the jQuery one.

The main advantage being the function chaining.
so effectively you have your $() function which you can use to select your id

Then on the back of that you have your css() function to simply change a style or something

so in the end you can have say one element call and use it multiple times like so:
$('#test').css('display','block').css('color','#FFF');
as opposed to:
document.getElementById('test').style['display']='block';
document.getElementById('test').style['color']='#FFF';

So using that you have seriously optimised your code, but this is where it gets shady with people using jQuery as doing like 10 css changes like the above is slow when compared to just changing a elements class name, which is where i find people go too far with their jQuery.

And with building your own your taking into account all these small things, and not just saying fuck that I'm gonna do it easily by telling jQuery to do it all which is stupid.

I've also noticed the magazine I get Web Designer Mag, every article involving simple things they have jQuery which is pissing me off quite frankly and its everywhere.
Its so complex now you might as well learn Javascript Grin.
Report Spam   Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
eXTReMe Tracker
Security Forum
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy
Page created in 0.031 seconds with 10 queries.