Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Drupal7 中,我使用颜色框,我需要克隆一个颜色框图像链接(加载页面上所有颜色框链接中的第一个)并将其添加到 div 标记中。我怎么能用 javascript/jquery 做到这一点?谢谢!
我找到了这个解决方案:
$('#main-stuff').append('<div id="bgImgOverlay"></div>').css("cursor","pointer"); $('#bgImgOverlay').click(function() { $("a[rel='gallery-all']").colorbox({open:true}); });