I want to affect a variable containing url on the href attribute of the css button, which I tried location.href, but that didn't work.
here is the description of my button:
<div>
<p><a id="gameNextLevel" class="button" href="">Next</a></p>
</div>
Here is my JSF related code:
var uiNextLevel = $("gameNextLevel");
matchingGame.savingObject.currentLevel="game6.html";
uiNextLevel.click(function(e) {
e.preventDefault();
location.href = matchingGame.savingObject.currentLevel;
});
Any idea please thanks in advance :)
source
share