in js file, I have below code:
jQuery(document).ready(function($) {
$("ul.colors .color1").click(function () {
$("#colors").attr("href", "wp-content/plugins/hekim/widgets/bclinico/css/colors/default.css");
return false;
})
});
it works only on the homepage because on other pages, it adds page name to the url.for example:
on the home page: link.com/.../defauls.css works
on contact page: link.com/contact-page/default.css not working
how can I write directly js file url instead of wp-content/... to href?
it works under wordpress, I can do it easily with `php/wordpress code but it is in a js file and I want to make it with js or jquery code.