I have been trying to change this script so it can use href instead of Select Box.
Code:
<script type="text/javascript">
$(document).ready(function(){
var theme = $.cookie("backgroundImage");
if (theme){document.getElementById("shelf").style.backgroundImage = "url("+theme+")";}
$("#themes_selectbox").change(function() {
theme = $(this).val();
$.cookie("backgroundImage", theme, {expires: 365});
document.getElementById("shelf").style.backgroundImage = "url("+theme+")";
});
});
</script>
Code:
<body id="shelf">
<div id="example">
<select id="themes_selectbox" onChange="changeTheme()" name="ChangeBG">
<option value="#">Select Background</option>
<option value="example.jpg" selected="selected">Default</option>
<option value="example.jpg">Example</option>
</select>
</div>
</div>
I am trying to make it work with this example href but with no success
is this an easy solution? Can anyone help me? Many Thanks
Code:
<a href="images/example.jpg"><img src="example.jpg" alt="" /></a>
Bookmarks