help with appending html url passing variable doesnt work but setting text does please help
How can I get it to work with variable? top one works with double quotes i.e forced so to speak but doesnt work with variable sitepage in the browser before I click on it there is a space between technology and.com in variable one i.e website.com/ technology.html but not in the double quote one i.e. website.com/technology.html
- $("#home").append('<a href="http://www.website.com/' + "Technology" + '.html">' + $(this).find("category").text() + '</a>');
- $("#home").append('<a href="http://www.website.com/' + sitepage + '.html">' + $(this).find("category").text() + '</a>');