In this Post I would like to analyze the use of scripts unobtrusive from the point of view of the Web designer. Normally, in fact, a script that is not intrusive towards the end of the navigator!
But it can also be good for the Web Designer?
JavaScript unobtrusive from the point of view of the Web Designer
Putting ourselves in the shoes of a web designer could identify two categories of unobtrusive JavaScript: Unobtrusive Javascript true and pseudo unobtrusive JavaScript.
Both categories, however, are not completely non-intrusive (always from the point of view of the Web Designer). A real and complete unobtrusive JavaScript should not take any action on the Web page, but this is - for now - basically impossible. The minimal operation required during the installation of a script, however the inclusion of the inclusion of the script itself! So this is permitted operation that - actually - it does not force the web designer to make regular adjustments to the structure of the page. The simple positioning of the inclusion of the script tag inside the head can then be considered non-intrusive.
The true unobtrusive JavaScript
The scripts of this type are those that require only the inclusion of the script unobtrusive and not; claim no other operation! Script of this type are, for example (the usual and-cited), Snap . Once you entered the code include the web designer must not carry out any further operation, because the script snap operates on standard tags.
The pseudo unobtrusive JavaScript
These differ from the previous ones in that they require a tagging further to function properly. Examples of this type are Control.Tabs of Ryan Johnson or library for slideshow Lightbox JS . per identificare i link che devono essere modificati. Lightbox JS , in particolare, richiede addirittura la presenza esplicita sia di Prototype che di Scriptaculous . The latter solution, for example, requires the inclusion in the Tag A attribute rel to identify links that need to be modified. Lightbox JS , in particular, requires even the presence of both explicit Prototype that of Scriptaculous . As indicated on the website Lightbox JS , the inclusion of the script should look like this:
1 2 3 | "text/javascript" src = "js/prototype.js" >< / script > < script type = "text / javascript" src = "js / prototype.js"> </ script > "text/javascript" src = "js/scriptaculous.js?load=effects" >< / script > < script type = "text / javascript" src = "js / scriptaculous.js? load = effects"> </ script > "text/javascript" src = "js/lightbox.js" >< / script > < script type = "text / javascript" src = "js / lightbox.js"> </ script > |
The links pointing to un'immmagine you want to view the system with Lightbox JS should be written like this:
1 |
In addition to identifying a group of images, to add the ability to scroll forward and backward images, the Tag A must be set as follows:
1 2 3 | "images/image-1.jpg" rel = "lightbox[roadtrip]" > image #1 < / a > < a href = "images/image-1.jpg" rel = "lightbox [roadtrip]"> image # 1 </ a > "images/image-2.jpg" rel = "lightbox[roadtrip]" > image #2 < / a > < a href = "images/image-2.jpg" rel = "lightbox [roadtrip]"> image # 2 </ a > "images/image-3.jpg" rel = "lightbox[roadtrip]" > image #3 < / a > < a href = "images/image-3.jpg" rel = "lightbox [roadtrip]"> image # 3 </ a > |
The need for these constrictions is evident; there is no easy way to distinguish a link element (Tag A ) from another. In particular it is not clear which element the Web designer wants to display in one way or another. Necessarily be the Web designer to indicate somehow the Tag and their behaviors. Are therefore required - intrusive - totally understandable, not at all diminish the usefulness and potential of these scripts. Only lead to greater detail and a few lines of code in over the Web Designer.
It is interesting, however, the double aspect of 'unobtrusive JavaScript, analyzed both from the point of view of the end user from the point of view Web Designer.






Latest Comments
kOoLiNuS : @ kOoLiNuS: a missing
and a 
kOoLiNuS : @ Giovambattista Fazioli: I subscribed to, but when I was my amateur use of the platform ...
Giovambattista Fazioli : @ kOoLiNuS: Yes, this is a known issue. Occurs when the tables in question are ...
kOoLiNuS : @ Giovambattista Fazioli: Thanks for the patch! But I found that on a couple of tables (if you need I tell you ...
Giovambattista Fazioli : @ kOoLiNuS: Hello, just placed. Unfortunately, the problem occurs on servers that have ...