I want to write an own jquery function which do some stuff on all dom elements which has a specially class tag.
But some elements should have some specific animations. Thats why i want to declare some parameters inside of the dom elements like that:
<div class='animate' animate-speed='0.5' animate-dir='up'></div>
You can try to use data-attributes.
HTML5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning. data-* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as non-standard attributes, extra properties on DOM, or Node.setUserData().
HTML code :
<div class='animate' data-speed='0.5' data-dir='up'></div>
notice : you can't to use ":" but "="
JS code :
try this jsFiddle