With this article I would like to recap the delegation mechanism and the use of own events. I hope this will help the reader avoid the troubles I’ve experienced.
Let’s recall the use of delegation with the following example:
With this article I would like to recap the delegation mechanism and the use of own events. I hope this will help the reader avoid the troubles I’ve experienced.
Let’s recall the use of delegation with the following example:
There are many hyperlinks like < a href=«#idName» > … < /a > on different web pages that do not take you to another page, but rather to a place (target) on the same page. This is common practice for large articles with an index in which every item is a link to the corresponding heading. In the case of a footnote – the superscript is linked to the bottom of the article and the footer itself has a link back to the text. There is a great number of articles written in this fashion in different network encyclopedias and in journals.
Unfortunately most of todays browsers simply jump to the place where the hyperlink points. This is very different from scrolling that happens slowly and takes some notable time in a way that it can give the reader a sense of how much information is being skipped.
Rather unfortunate, isn’t it?
Fortunately there’s a jQuery plugin that let’s one create the effect of text scrolling upon clicking the target link. This scroll simulation looks just like scrolling by hand but happens automatically and much faster – within a second by default. In this way the user gets the sense of the amount of information going by but doesn’t have the time to get bored.
The plugin is called jQuery.Local.Scroll, it requires jQuery and another plugin – jQueryScrollTo which it encapsulates. Once jQuery and both aforementioned plugins are installed a function call that will activate automatic scrolling for all internal hyperlinks this simple:
No web developer can hold those tears of joy while reading HTML 5 specs. Most functions like WebGL, multi-threading and web-sockets are yet to be implemented in browsers but some of the useful tags can already be employed.
Internet Explorer, however, has managed to fail on HTML 5 support even in version 8 – new tags outside HTML 4 are ignored, they cannot be assigned any styles. IE has another issue – HTML 5 support has to be enabled separately for a static document and for dynamically added contents.