user2695680
user2695680

Reputation:

jQuery qTip is not working after calling it using .html() method

I am facing problem for jQuery qTip while data is coming dynamically through JS.

jQuery qTip plugin doesn't work for below code

var data = '';
data = '<div class="cont">';
data =+ '<a href="#" class="qTip"></a>';
data =+ '</div>';

$('#container').html(data);

but it works when I place the anchor tag directly to html markup.

<a href="#" class="qTip"></a>

Upvotes: 2

Views: 211

Answers (1)

Nitesh
Nitesh

Reputation: 484

Well, I assume, possibly you could attach an event again after document finish load..

$('.qTip').on('click', function(){
  $(this).qTip();
});

Upvotes: 1

Related Questions