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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -