edit: nevermind, fixed it.
Here is the code block I'm working with. I get a syntax error on the line where the var is declared.
Code:
<script>
var changeBG(t){
$('body').removeClass().addClass($("#bgchange").val());
}
</script>
<select name="bgchange" id="bgchange" onchange="changeBG(this);">
<option value="bg1">BG 1</option>
<option value="bg2">BG 2</option>
<option value="bg3">BG 3</option>
</select>
Somebody is helping me with this, and now I'm running into this (hopefully) little issue. I'm guessing it needs to be declared as a function or something, but as I don't know javascript (this is the jQuery library btw) I really have no idea what to do.
I'm hoping for a speedy response! This is a very small project and I keep running into big problems.
__________________
╠ Please login or register to view this content. Registration is FREE
for cheap hosting solutions. ╣
Use the coupon code " SINGLECENT" to pay just a single cent for the first month!
Last edited by Madman340; 04-24-2010 at 06:29 AM..
|