arvindvyas / Country-State-Select

It will fetch the countries and according to that fetch the state of that countries, currently it is for countries listing
MIT License
69 stars 78 forks source link

chosenIsRequired function #32

Closed variousred closed 8 years ago

variousred commented 8 years ago

For people who are NOT using chosen:

I could not get this to work unless i modified these sections

  function addChosenToState(){
    if (chosenIsRequired && stateIsNotText()) {
      $('#' + state_id).chosen();
    }
  }

to this

  function addChosenToState(){
    if (chosenIsRequired() && stateIsNotText()) {
      $('#' + state_id).chosen();
    }
  }

(the chosenIsRequired as a function call) in https://github.com/arvindvyas/Country-State-Select/blob/master/vendor/assets/javascript/country_state_select.js.erb

arvindvyas commented 8 years ago

@variousred thinks I am looking into it .

variousred commented 8 years ago

Thanks @arvindvyas