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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Include a css class as part of href link in Javascript

    Hi there,

    I have no idea about javascript but wanted to use the Konami script on my site. This is the current code:

    var kkeys = [], konami = "38,38";
    $(document).keydown(function(e) {
    kkeys.push( e.keyCode );
    if ( kkeys.toString().indexOf( konami ) >= 0 ){
    $(document).unbind('keydown',arguments.callee);


    document.location.href = '../cartoons/swearing/01swear.html';



    }
    });

    This link is a "thickbox" link and when called from an html document would be written:

    <a href="02swear.html?height=400&amp;width=450" class="thickbox">

    I just wondered how to get the javascript to include the class so that it acts in the same way it would if just clicking the link. I imagine this is upsettingly easy to do but I can't seem to find anything about it!?

    Any help most appreciated,

    Cheers in advance

    VeeZed

  • #2
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I have the same problem

    nobody can't help us?
    did you find de solution?

    thanks

    af


  •  

    Posting Permissions

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