dom - jquery doesn't see new elements -


I am new to JQuery, so bear with me :).

I have a simple problem:

  $ (document) .ready (function () {$ ("# instrument"). (Function () {$ ("# Tunings"). Html ("& lt; select id = \" tuning selector> gt "[..] ");}); $ ("# tuning selector" ). Change (function () {DoSomethingWithTheValue ();})}});  

The problem is: When the device has changed, the script no longer responds to more tuning selector changes. New tuning selector element does not look like jQuery ...

Do I need to refresh or do this on JQuery? That's because it looks at the latest DOM?

Normally you want to use it so that the handler can be applied to the new match to the selector The ingredient and representative of a higher element in the dome.

  $ ('body'). On ('change', '#control', function () {doSomething ();});  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -