I\'m trying to build a href on the fly to pass it into fancybox iframe and pass the link into a php file
1条回答 走了就别回头了 (楼主) 2021-01-26 04:27 No need to select all a tags and loop, you can do simply like $(document).on('click', '.Images', function(e) { e.preventDefault(); var Href = 'GetImg.php?img=' + $(this).attr("href"); alert(Href); $.fancybox.open({ href: Href, type: 'iframe', padding: 5 }); }); 0 讨论(0) 发布评论: 提交评论 加载中... 自定义标题段落格式字体字号代码语言点击上传x 验证码 看不清? 提交回复
No need to select all a tags and loop, you can do simply like
a
$(document).on('click', '.Images', function(e) { e.preventDefault(); var Href = 'GetImg.php?img=' + $(this).attr("href"); alert(Href); $.fancybox.open({ href: Href, type: 'iframe', padding: 5 }); });
热议问题