Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove reward img from fancybox #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
<% if(theme.alipay) {%>
<div class="pay_item checked" data-id="alipay">
<span class="radiobox"></span>
<span class="pay_logo"><img src="<%= theme.alipay%>" alt="支付宝" /></span>
<span class="pay_logo"><img src="<%= theme.alipay%>" alt="支付宝" id="nofancy"/></span>
</div>
<% } %>
<% if(theme.weixin) {%>
<div class="pay_item" data-id="wechat">
<span class="radiobox"></span>
<span class="pay_logo"><img src="<%= theme.weixin%>" alt="微信" /></span>
<span class="pay_logo"><img src="<%= theme.weixin%>" alt="微信" id="nofancy"/></span>
</div>
<% } %>
</div>
Expand Down
8 changes: 5 additions & 3 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ require([], function (){
if(isFancy.length != 0){
var imgArr = $(".article-inner img");
for(var i=0,len=imgArr.length;i<len;i++){
var src = imgArr.eq(i).attr("src");
var title = imgArr.eq(i).attr("alt");
imgArr.eq(i).replaceWith("<a href='"+src+"' title='"+title+"' rel='fancy-group' class='fancy-ctn fancybox'><img src='"+src+"' title='"+title+"'></a>");
if (imgArr.eq(i).attr("id") != "nofancy"){
var src = imgArr.eq(i).attr("src");
var title = imgArr.eq(i).attr("alt");
imgArr.eq(i).replaceWith("<a href='"+src+"' title='"+title+"' rel='fancy-group' class='fancy-ctn fancybox'><img src='"+src+"' title='"+title+"'></a>");
}
}
$(".article-inner .fancy-ctn").fancybox();
}
Expand Down