This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

fyn
fyn

I used a javascript file in frontend, but I couldn't get the right path there by using this statement.

 jQuery('#style_color').attr("href", "assets/css/theme-colors/" + color + ".css");

Is there any way to resolve this problem? thanks!

The only way I found could work is putting the js into the htm file and using this statement:

jQuery('#style_color').attr("href", "{{ 'assets/css/theme-colors/'|theme }}" + "/" + color + ".css");

but putting all the js file related to the asset paths is so weird.

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.