Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder nolvorite's Avatar
    Join Date
    Dec 2006
    Posts
    176
    Thanks
    7
    Thanked 0 Times in 0 Posts

    this is strange... :/

    For some reason in this test message board http://vanishingpoint.b1.jcink.com/index.php (not advertising lol its just a place im currently coding my skin) none of the things I had changed in the syntax with jQuery were working (like the entire jQuery code didnt work) when i'm logged in.

    In order to see the difference you have to register an account.

    here's the entire code
    Code:
    <script type="text/javascript">
    $("#userlinks td:contains('Welcome Guest')").wrapInner("<div id='lag1'></div>").html($("#userlinks td:contains('Welcome Guest')").html().replace(/Guest/, '<span class="guestbx">Guest</span>'));
    $("div#lag1").insertBefore("#logostrip");
    $("#navstrip").html($("#navstrip").html().replace(/&nbsp;/, ''));
    $("#menux a:last").attr("id","sadfix");
    $("div#navstrip a:first-child").attr("id","original");
    $("#menux a:last").hover(function(){$("div#stupidpad").css("background-image","url('http://vanishingpoint.b1.jcink.com/uploads/vanishingpoint//23125i.png')")},function(){$("div#stupidpad").css("background-image","url('http://vanishingpoint.b1.jcink.com/uploads/vanishingpoint//23125g.png')");});
    </script>
    (that looks like its terribly coded lol)

    I don't think doctypes/errors in html is the issue here, but oh well
    I need help guize. thanks

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,984
    Thanks
    56
    Thanked 557 Times in 554 Posts
    Quote Originally Posted by nolvorite View Post
    In order to see the difference you have to register an account.
    well, that's not going to happen (not me, anyway)

    what might get you more help is if you set up a guest account, post the login details here and then delete it once your problem is solved.

  • #3
    Regular Coder nolvorite's Avatar
    Join Date
    Dec 2006
    Posts
    176
    Thanks
    7
    Thanked 0 Times in 0 Posts
    username: dundun
    password: nononono1

    there

    thanks for helping

  • #4
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,984
    Thanks
    56
    Thanked 557 Times in 554 Posts
    without really understanding what you are trying to do, I can see (from the error console...) that your code is failing when you have a registered user because that td does not contain the phrase "Welcome Guest".

    if you want to run a simple test to see if it is there, wrap the whole code in an if statement...
    Code:
    <script type="text/javascript">
    if($("#userlinks td:contains('Welcome Guest')").length>0){
    $("#userlinks td:contains('Welcome Guest')").wrapInner("<div id='lag1'></div>").html($("#userlinks td:contains('Welcome Guest')").html().replace(/Guest/, '<span class="guestbx">Guest</span>'));
    $("div#lag1").insertBefore("#logostrip");
    $("#navstrip").html($("#navstrip").html().replace(/&nbsp;/, ''));
    $("#menux a:last").attr("id","sadfix");
    $("div#navstrip a:first-child").attr("id","original");
    $("#menux a:last").hover(function(){$("div#stupidpad").css("background-image","url('http://vanishingpoint.b1.jcink.com/uploads/vanishingpoint//23125i.png')")},function(){$("div#stupidpad").css("background-image","url('http://vanishingpoint.b1.jcink.com/uploads/vanishingpoint//23125g.png')");});
    }
    </script>

  • #5
    Regular Coder nolvorite's Avatar
    Join Date
    Dec 2006
    Posts
    176
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I was having a problem having the code work when I was logged in
    thats what I was tryna solve

    anyways I just moved the right bracket before the call for #lag1 and it works fine now
    Last edited by nolvorite; 09-16-2012 at 07:29 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •