I have a map in a popup. I want to transfer the values (coordinates) from this to my main window and run the method after changing the coordinates.
In my main window, I have this event handler
$(".spatial").change ( function () { alert('Handler for .change() called.'); } );
For some reason, alert () is not called when this form changes (the value attribute changes).
<form action="#" id="spatial_points" class="spatial"> <input type="hidden" id="start_point" class="spatial" value=""/> <input type="hidden" id="end_point" class="spatial" value=""/> </form>
I know that change () only works with form fields. I am wondering if this extends to the hidden form field?
Here is what the above code looks like after choosing a card:
<form id="spatial_points" class="spatial" action="#"> <input id="start_point" class="spatial" type="hidden" value="(-7.9091601975133266, 127.0170435)"> <input id="end_point" class="spatial" type="hidden" value="(-44.73273833806611, 154.790481)"> </form>
Ankur source share