Question

I would add the option tag a class form-control. The option tag have a id country.

{{ store.country | country_select }}

i try it with jquery but it didn't work.

$("#country").addClass("form-control");
Was it helpful?

Solution

That syntax looks correct, so as long as the rest of your code is functioning without errors you should see the class being added. You may want to make sure that you're initializing jQuery properly in your code, and calling addClass after the jQuery file is loaded too.

Can you provide a link to your store, or some further context of the code you're using?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top