...

View Full Version : Include a css class as part of href link in Javascript



VeeZed
05-13-2009, 10:16 PM
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:thumbsup:

afarras
06-09-2009, 01:29 PM
nobody can't help us?
did you find de solution?

thanks

af



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum