0

My extension modifies page's code:

$.get(chrome.runtime.getURL('/html/new-search.html'), function(data) {
        $('.site-header__item--search').html(data);
    });

Then I'm adding event listener to previously attached elements:

$('.new-search').on({
        focus: function (){
            alert('wow');
        }
    });

It doesn't work. In spite of this, such code is being successfully executed on parts of document, which weren't affected by script. What can be the fix?

agamendon
  • 3
  • 4

0 Answers0