2015-03-25 121 views
0

对不起,我的无知,但我得到了一些页面上的动态内容,需要语义弹出工作。 我该怎么做? 基本上,我需要合并这些:Jquery和Semantic-ui结合了这两个

$('body').on('click', '.fakelink', function() { 

}); 

    $('.fakelink').popup({ 
    on: 'hover' 
    }); 

回答

0

试试这个: -

$(document.body).on('click', '.fakelink', function() { 
    $(this).popup({ 
     on: 'hover' 
    }); 
}); 
+0

没有,没有工作 – topedge 2015-03-25 16:59:19

0

试试这个,

$(document).on('mouseenter', '.fakelink', function() { 
    $(this).popup(); 
}); 
+0

没有这也不能工作 – topedge 2015-03-25 16:59:28

0

这应该这样做

$(document).ready(function() { 


$('body').on('mouseover', '.fakelink', function() { 
    $(this).popup({ 
     on: 'click', 
     content : 'My favorite dog would like other dogs as much as themselves' 
    }); 
}); 

});

DEMO