What are jQuery special events? I was looking for him, and I'm still a little confused, I think I could understand a little about it. Please tell me if this were a good candidate for coding using special jQuery events.
I need to create a function where people can put a paragraph on the article page so they can come back later and continue reading where they left off. There will be a link that says “Place a bookmark” when a person clicks on this link, it will include “Bookmark Mode”, where a person can now hover over a paragraph within an article, and when they hover over a paragraph, “BOOKMARK” will appear above that paragraph. THIS "when they soar from this paragraph, this div disappears. When they click on a paragraph when in bookmark mode, the text in the BOOKMARK THIS section changes to “YOU INSTALL A BOOKMARK”, after which the div disappears after a few seconds and the Bookmark mode is turned off. If the user has already bookmarked the page,but decides to move the bookmark to another paragraph, then everything will be the same as if the person placed the bookmark for the first time, but instead the text will read: "YOUR PAPER WAS MOVED."
If I understand correctly, and this example is really a good candidate for special events, can someone help me with the basic location of the structure? I don’t need all the coding, I just need to know where the hover code should go, and hover, click and move bookmarks, etc.
jQuery.event.special.myevent = {
setup: function( data, namespaces, eventHandle ) {
},
teardown: function( namespaces ) {
},
add: function( handleObj ) {
},
remove: function( handleObj ) {
},
_default: function( event ) {
}
};
From benalman.com/special-events
source
share