के साथ पृष्ठभूमि छवि बदलें मैं पृष्ठभूमि बटन चयन के साथ पृष्ठभूमि का पृष्ठभूमि बदलना चाहता हूं। प्रत्येक रेडियो बटन में अलग-अलग छवि होती है।रेडियो बटन
<input name="BG" id="wood" type="radio" value="" class="bgCollection" />
<label for="radio">Wood</label>
<input name="BG" id="steel" type="radio" class="bgCollection"/>
<label for="radio">Steel</label>
<input name="BG" id="metal" type="radio" value="" class="bgCollection"/>
<label for="radio">Black metal</label>
Jquery:: मैं इसे की तरह की कोशिश की
$(document).ready(function(){
$(".bgCollection").change(
function()
{
if($("input#wood").attr("checked"))
{$("html").css('backgroundImage','url(../images/wood.jpg)');}
if($("input#steel").attr("checked")
{$("html").css('backgroundImage','url(../images/BG-steel.jpg)');}
if($("input#metal").attr("checked"))
{$("html").css('backgroundImage','url(images/blackMetal.jpg)');}
});
});
लेकिन इस तरह से पृष्ठभूमि में बदलाव नहीं किया गया है।
यदि आप jsfiddle के साथ रननेबल कोड पोस्ट करते हैं तो यह अच्छा होगा। – uuidcode