I have been working on appending divs using Jquery to create links that navigate to various pages within my site. Currently, my website is hosted on my local computer and not online. As I prepare to transfer the files to my domain, I am encountering issues with the links not functioning correctly unless they contain the full path to the file location on the computer.
Below is an example of the Jquery code I am using:
$(document).ready(function () {
$('#work').hover(function () {
$(this).css('background-image', 'url(/Users/gcp0001/Desktop/Home/work.png)')
});
});
It seems that only providing a partial link such as 'url(Home/work.png)'
does not work when uploaded to the domain. I'm curious as to why this is happening and what steps I need to take to ensure smooth functionality of the links once the files are transferred to the domain.