I have a problem:
<div id="arrow"></div>
<div id="p0" style="content: url(images/cerchioSelezionato.png)"></div>
<div id="p1" style="content: url(images/cerchio.png)"></div>
My goal is: when i click on #arrow element, I want that the image of #p0 become cerchio and vice versa for this I wrote this code in jQuery:
$(document).ready(function(){
$("#arrow").click(function(){
$("#p1").attr({content:url(images/cerchioSelezionato.png)});
$("#p0").attr({content:url(images/cerchio.png)});
}
}
When I click on arrow in chrome the console gives me this error:
Uncaught ReferenceError: url is not defined
slider_script.js:12(anonymous function) slider_script.js:12m.event.dispatch jquery-1.11.1.min.js:3r.handle