0

How to handle this type of js on rails ? i have looked in Javascript helper but i didn't find a match for this case.

<li><a class="sea-green" href="javascript:chooseStyle('sea-green', 60)" title="Sea Green">Sea Green</a></li>

1 Answer 1

3

you can do it with jquery, something like this:

view:

<li><a class="sea-green" title="Sea Green">Sea Green</a></li>

JS file:

   $('.sea-green').click(function(){
        chooseStyle('sea-green', 60)
   });
Sign up to request clarification or add additional context in comments.

3 Comments

could you please check this link its for the theme i am trying to use in rails , i have edited the css to load the images through the assets , and also i have added all the assets in application.rb , the page you will see i think its working with me after modifying , but for the color scheme on the left still can make it work.
if you would like to check the files of the theme i can give you link to download it and see which JS file is used by the color scheme and tell me what should i do
both of color scheme and example pattern not working with me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.