I'm looking to dynamically change the position of an item on my webpage when it is clicked. Is there a way I can achieve this without relying on id names? I currently have a code snippet that successfully changes the background color, but for some reason, it's not working when I try to modify the position instead.
$(document).click(function(event) {
$(event.target).css({'background-color': 'blue'});
});
Any assistance would be greatly welcomed. Thank you!