@
@
@deffect2014-03-06 01:59:35
JavaScript
@deffect, 2014-03-06 01:59:35

How to reach elements in a dynamically created balloon (Yandex.Maps API) through JS?

It's about this page.

When you place a blue marker (at the bottom of the page), a form opens in the balloon.
I can not get through js to the elements of this form.

I try like this:

$(function() {
  $('#imgLink').on('click', function(){
    //$('#addForm input[name="image"]').click();
    alert('!');
    return false;
  })
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2014-03-06
_

Try like this

$(function() {
  $(document).on('click', '#imgLink', function(){
    //$('#addForm input[name="image"]').click();
    alert('!');
    return false;
  })
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question