JavaScript Buttons Conflict With Each Other

-ICEBOX-

New Member
Hi i have 3 different buttons on my page that are used to change the background image/colour of the page.The problem i have is that my main toggle button doesn't toggle the background once the image has been set to it using 1 of the other buttons.CSS:\[code\]body {margin: 0px;padding: 0px;border: 0px;}.bgimg {}\[/code\]HTML:\[code\]<input type="text" id="ImageURL"></input><button id="SetBG">Set Background</button><button id="ReSetBG">Re-Set</button>\[/code\]JavaScript:\[code\]$(function() { $( "#DialogBackground" ).dialog({ open: function (event, ui) {$(".ui-widget-overlay").css({opacity: 0, filter: "Alpha(Opacity=00)"});}, modal:true, autoOpen:false, height:450, width:450, resizable: false, buttons: [{ id:"remove", text: "Remove/Add Background", click: function() { $( "body" ).toggleClass( "bgimg", 1000 ); return false; } }] });$("#SetBG").click(function() { var URL = document.getElementById("ImageURL").value; $(".bgimg").css('background-image',"url(" +URL +")"); return false;});$('#ReSetBG').click(function() {$('.bgimg').css('background-image', "url('http://192.168.0.4/DesktopVersion/Inc/Images/Background/DarkWood.jpg')");return false;});\[/code\]If someone could please show me what code is wrong or conflicting that would be great.
 
Back
Top