Created
August 23, 2015 15:11
-
-
Save thomasJang/43d2d87470633d70b7da to your computer and use it in GitHub Desktop.
find event - axisj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.els["control"].bind("click", function (e) { | |
e = e || window.event; | |
var btn_value; | |
var target = axf.get_event_target(e.target, function (el) { | |
if ('getAttribute' in el) { | |
if (btn_value = el.getAttribute("data-els-btn")) { | |
return true; | |
} | |
} | |
}); | |
if (target && btn_value) { | |
if (btn_value == "add-artcle") { | |
_this.add_artcle(_this.els["control-add-type"].val()); | |
} | |
else if (btn_value == "move-up-artcle") { | |
_this.move_artcle(target.getAttribute("data-article-index"), "up"); | |
} | |
else if (btn_value == "move-down-artcle") { | |
_this.move_artcle(target.getAttribute("data-article-index"), "down"); | |
} | |
else if (btn_value == "remove-artcle") { | |
_this.remove_artcle(target.getAttribute("data-article-index")); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment