Good day! The client asked for the livetex form on the site to implement sending the data to the Yandex metrics goals when clicking on some of its elements. The form is connected with a JS script block in the body of the main page, i.e. HTML is generated using JS and their server. LiveTex supports the goals of Yandex so far in development, so you need to invent something yourself. I recognized the div class of these elements through Inspect Element in Mozille and wrote scripts with jQuery in the body of the main page that catch clicks on these classes — and then call yaCounterMMMM.reachGoal ('xwidget2');
However, nothing happens - jQuery doesn’t even catch events that are generated by clicking on the components of the livetex form, despite the fact that after the end of the page loading, this seems to be the same full HTML as its native. He is inspected in Mozilla!
Can I do something? LT technical support is silent.
Here is a test page where you need to debug the algorithm itself and then transfer it to the main one (for the sake of simplicity, instead of reachGoal (), they set up a banal alert): http://samurai.spb.ru/testm.html
There, a handset will pop up on the right (no need to touch the bottom shape), you need to click on it, the single-line shape will unfold (with a green handset and a green send button) to which our handler should be screwed. (Trick - the tube pops up only from 10 am to 20 in the evening, for the night of Livetex it is disconnected).
Ps. Typical handler:
$(document).ready(function() { $('.lt-xbutton-icons').click(function(){ alert('Клик по LiveTex элементу!'); return true; }); });