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

05-13-2009, 11: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.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


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