views:

27

answers:

1

Hi I'm new to scripting

Trying to change the css acording to a url variable, using jqURL plugin. for some reason this does not work for me:

 $(function(){

var n= $.jqURL.qs();
alert(n)

$("link[rel=stylesheet]").attr({href : 'n + ".css"'});

});

the alert is there for debug, and works well, so it is a matter of how i put the var in the attribute.

this, for example, works fine:

if(n == 'red') {
$("link[rel=stylesheet]").attr({href : "red.css"});}

help please

+1  A: 
$("link[rel=stylesheet]").attr({href : n + ".css"});
mmcteam.com.ua
tx, but does not work :(
Ido
oops, now it does. thank you
Ido