Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • jQuery Location
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
jQuery Location
Tweet Topic Started: Sep 8 2008, 02:36 PM (9,814 Views)
Nic Sep 8 2008, 02:36 PM Post #1
rawr

Posts:
29
Group:
Member
Member
#3
Joined:
Jun 10, 2008
Coding language
HTML/CSS
Not a code request since I kinda want to do this (somewhat) by myself, and not really discussion but kinda supporty, so apologies.
I thought it'd be better to post than poke Choco via PM or via MSN in an effort to help kick that crappy board off the #1 spot in the coding directory. It violates ToU but I'd rather not wait for it to disappear that way.

Basically I'd like to know how to 'say' in jQuery If the location is this then do that. Like if you were viewing a certain page, like the online users list.

Any help would be greatly appreciated :) I've googled it and looked at jQuery documentation and found nothing helpful.
Also, why do you have a 'Smilies' button which does the exact same thing as the 'Show All' button? :P
Offline Profile Goto Top
 
slayer766 Sep 9 2008, 01:56 PM Post #2
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
if(location.href.match(/\/online/i)){
//Do this
}

?
Offline Profile Goto Top
 
HolySavior Sep 9 2008, 02:15 PM Post #3
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
pretty much what slayer gave you is what you use. you just have to use regular JS for that. jQuery doesnt really handle things like that. unless i completely missed something, but so far i havent come across anything like that.
Offline Profile Goto Top
 
slayer766 Sep 9 2008, 04:32 PM Post #4
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Yeah jQuery can't do location checks the last time I heard, well technically it can because it's a JS library.
Offline Profile Goto Top
 
Nic Sep 10 2008, 11:29 AM Post #5
rawr

Posts:
29
Group:
Member
Member
#3
Joined:
Jun 10, 2008
Coding language
HTML/CSS
slayer766
Sep 9 2008, 04:32 PM
Yeah jQuery can't do location checks the last time I heard, well technically it can because it's a JS library.
Ah that sucks :O
Thanks anyway guys ^_^
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code University · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 7:45 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy