2015-03-25 51 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