Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
修复 jQuery 插件执行方法时无返回值
  • Loading branch information
Cople committed Oct 15, 2017
1 parent a375ec2 commit 2589abc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dist/jquery.social-sharer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/social-sharer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "social-sharer",
"version": "1.1.1",
"version": "1.1.2",
"description": "最 Pure 的社会化分享按钮",
"main": "dist/social-sharer.min.js",
"keywords": [
Expand Down
15 changes: 7 additions & 8 deletions src/jquery.plugin.wrapper.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
function plugin(method, param) {
return this.each(function() {
var $el = $(this);
if (typeof method === "string") {
$el.data("SocialSharer")[method](param);
} else {
if (!$el.data("SocialSharer")) $el.data("SocialSharer", new SocialSharer(this, method));
}
});
if (typeof method === "string") {
return $.data(this[0], "SocialSharer")[method](param);
} else {
return this.each(function() {
if (!$.data(this, "SocialSharer")) $.data(this, "SocialSharer", new SocialSharer(this, method));
});
}
}

0 comments on commit 2589abc

Please sign in to comment.