Creating elsif/else statement for line item properties

18 2 6

I checked out the Responsive theme on a demo. Looks like the file we're after is Assets/app.js. It looks like this (from the demo theme):

It does use jQuery, which is a bonus. I'd go right to the bottom of that file, and put something along the lines of:

$(document).ready(function() {
  $('#[select id]').on('change', function() {
    $('#[field id]').toggle();
    $('[field id]').prop('disabled', !$('[field id]').prop('disabled'));

You've got to work out how the jQuery selectors work:

Now if that fails, start again from alert('hi');, see if there's a prompt or not, and work your way back up. If there's no prompt when you land on the page, wrong file. If there is a prompt, you'll need to change the JS you're putting at the bottom.

If you have trouble here, I suggest going through some JS tutorials online until you can write your own code like the bit above that does work for your page. 

1 Like
10 0 1

Awesome, thanks JØhn will give it a go!

1 Like
Shopify Partner
438 56 67

This is an accepted solution.


The JS code change is done, you can include it when you like. 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

Skype : lokendra.panwar1
1 Like