jquery - Select all ID tags containing a certain string in coffeescript -


I am trying to find the coffeescript version of Jquery below

  $ ('Input [Id * = "contact_date"] ') datepicker () .;   

I have a rail that users can use to create multiple nested records, in which there is a field, where "contact_date" is part of the ID for a date field. I want to add date picker to all those areas.

An example of the date id will be "Investor_Investor_Compare_Savents_392640934673_contact_date"

Any advice would be great Jquery & amp; New Sort on Coffeescript

I'm not sure that you can use the regex match in jquery selectors. I recommend that you put a class selector on each input that you add the Datapicor and select them as the following:

  $ ('.contact_date'). The other solution will be to insert all the input into a div block and select all children:  
  $ ('# id_of_your_div'). Childern.datepicker   

The difference between the CaufScript and the Javascript code in your case is that you can skip () in coffescript.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -