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: |
| Index Only | |
|---|---|
| Tweet Topic Started: Apr 21 2009, 02:59 AM (239 Views) | |
| PD.Phoenix | Apr 21 2009, 02:59 AM Post #1 |
![]()
Kokuhyou no Tentei
![]()
|
How do I make a code only work on the index? Yeah, i've got the code to work, but it works everywhere. And I only want it to work on the index. Thanx |
|
Phoenix Designz is now open Looking for staff and classers PM me here or on PD if interested. Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click ![]() | My dA | Vote PD Top 100 | | |
![]() |
|
| Reid | Apr 21 2009, 08:19 AM Post #2 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
edit: and I feel the need to note the if statement and something about jQuery. in jQuery if you're using $(document).ready() or $(function(){}) [the shorthand way] then the if statement needs to go inside. For example, say we have the code: and we want it to work only on the index; we'd put Just an extra thing I thought I'd mention. Edited by Reid, Apr 21 2009, 08:28 AM.
|
| The Resource Board | |
![]() |
|
| PD.Phoenix | Apr 21 2009, 04:26 PM Post #3 |
![]()
Kokuhyou no Tentei
![]()
|
Thanx Here's what I wanted it for lol http://zbcode.com/topic/1537704/ |
|
Phoenix Designz is now open Looking for staff and classers PM me here or on PD if interested. Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click ![]() | My dA | Vote PD Top 100 | | |
![]() |
|
| Vitality | Apr 21 2009, 10:27 PM Post #4 |
|
Tabula Rasa
![]()
|
Here is another way to do it (Not that Reid's is bad or worse than this)To get specific you could use some RegExp in the .match() to match your address more specifically, but the quotes work perfectly fine. |
![]() |
|
| Reid | Apr 21 2009, 10:34 PM Post #5 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
Yep - .indexOf() is faster though, and I'm all about speed. ![]() (although it's only milliseconds, so I'm not overly concerned about it) |
| The Resource Board | |
![]() |
|
| PD.Phoenix | Apr 22 2009, 06:02 PM Post #6 |
![]()
Kokuhyou no Tentei
![]()
|
Ok.. I've got another code that I can get to work on normal webpages, but I'm not too good with ZB and I can't get it to show up on a ZB forum PM me if you think you can help, don't wanna post it yet. Edited by PD.Phoenix, Apr 22 2009, 06:05 PM.
|
|
Phoenix Designz is now open Looking for staff and classers PM me here or on PD if interested. Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click ![]() | My dA | Vote PD Top 100 | | |
![]() |
|
| Reid | Apr 22 2009, 06:04 PM Post #7 |
![]()
What? The land of the free? Whoever told you that was your enemy.
![]()
|
And the code is...? |
| The Resource Board | |
![]() |
|
| PD.Phoenix | Apr 22 2009, 06:08 PM Post #8 |
![]()
Kokuhyou no Tentei
![]()
|
Edited my last post "PM me if you think you can help, don't wanna post it yet. " |
|
Phoenix Designz is now open Looking for staff and classers PM me here or on PD if interested. Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click ![]() | My dA | Vote PD Top 100 | | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Code University · Next Topic » |



















7:48 PM Jul 10