-
Notifications
You must be signed in to change notification settings - Fork 95
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
add data-trunk8-* support #44
base: master
Are you sure you want to change the base?
Conversation
@@ -226,8 +226,18 @@ | |||
if (!data) { | |||
$this.data('trunk8', (data = new trunk8(this))); | |||
} | |||
|
|||
// add data-trunk8-* support | |||
var elAttr = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer verbose name "elementAttributes"
@rviscomi thanks for your reply,and i have add a new commit to fix the problem. |
merge from the autor
@@ -226,6 +226,8 @@ | |||
|
|||
methods = { | |||
init: function (options) { | |||
// data-trunk8-* config prefix | |||
var trunk8DataAttributeName = 'data-trunk8-'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved into the return function with the other vars (elementAttributes, attributes).
format the script
thanks @rviscomi i learn much more than the code itself ~~ |
add attribute data-trunk8-* to each element for special settings
@rviscomi sorry for my english,i am uncertain if i understand your words
the order of the config is :
trunk8.defaults -- trunk8 config -- element attribute
and the next will override the last