Welcome Guest
[Log In]
[Register]
| Welcome to Big Boards. Big Boards at one time offered the Zathyus network our long famous Resource Archives, our extensive search indexes, and our info-packed resource forums. Eventually, these were made redundant by upgrades to the documentations and expanded search features added to the ZetaBoards software, and this forum then lost relevancy and subsequently became inactive. Our team then embarked on a new project called Planet Nexus, where a bold new experiment in forum promotion is taking place. We call it nexworking. NexusTree offers social networking pages for forums in a fully automated format. Your NexusTree page is created instantly when your join the nexus. Find out more by visiting Planet Nexus, and become part of the nexworking revolution. ![]() If you're already a member please log in to your account for additional access: |
| Prototype dollar function in JavaScript? | |
|---|---|
| Tweet Topic Started: Sep 2 2008, 09:10 AM (772 Views) | |
|
|
Sep 2 2008, 09:10 AM Post #1 |
![]()
Can I haz a Gord?
![]()
|
That's the function, I've only just recently seen this around while surfing the net, and I've NEVER seen anything like this before... What this does, if you didn't know already, is that this function will grab an element the very short way if you have a bunch of elements to grab. So something like this: If you were to have a code with a bunch of document.getElementById("rawr"); this function would simplify that so much more then just writing them all out and doing it by going through the dollar function like so: document.getElementById("rawr") now becomes $('rawr'); And NO this is NOT jQuery - it's plain JavaScript. Was pretty interesting to me...
|
Mike is my coding brother.
| |
|
|
|
| Morgan | Sep 7 2008, 06:32 PM Post #2 |
|
Safe Boating Is No Accident
![]()
|
I know very little about JavaScript, but that's pretty cool. Perhaps jQuery uses a similar function in how it operates? edit: Oooh, congrats on 200 posts by the way.
|
![]()
| |
|
|
|
|
|
Sep 10 2008, 05:11 PM Post #3 |
![]()
Can I haz a Gord?
![]()
|
Whoa someone commented.
Yeah jQuery does this, but in a different way. JavaScript(With the dollar function available): $('rawr').innerHTML="Hello"; jQuery: $('#rawr').innerHTML="Hello"; Not(EDIT! I meant to say "Note" instead of "Not"...)e the difference between the two as jQuery references the # symbol, which is an ID. As the JavaScript way doesn't require that. |
Mike is my coding brother.
| |
|
|
|
| HelenaZF | Sep 10 2008, 08:05 PM Post #4 |
![]()
advanced techno-feeb
![]()
|
I'm so impressed with you guys that understand this stuff...
![]() Ginger = HelenaZF
|
Visit the Planet Nexus page! Download some of my graphic sets HERE | |
|
|
|
|
|
Sep 11 2008, 10:05 AM Post #5 |
![]()
Can I haz a Gord?
![]()
|
I could always teach you if you wanted Helena. |
Mike is my coding brother.
| |
|
|
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Programming & Web Design · Next Topic » |
| Track Topic · E-mail Topic |
|
Hosted for free by ZetaBoards · Privacy Policy





Was pretty interesting to me...







