Tag Archives: HTML5

Using semantic HTML, why you should…

Terry Ryan posted a nice article serving as an introduction to semantic HTML…

Check it out….
http://www.adobe.com/devnet/html5/articles/semantic-markup.html

Tagged ,

How to implement a BLINK tag in AngularJS

One of the features of early HTML that is so uncool that it’s so extremely cool now that it has taken epic proportions, is that much celebrated as well as hated BLINK tag…

Now, it disappeared from most implementations due to the massive criticism it received, In 1996 Jakob Nielsen even described the element as “simply evil” in his Alertbox column Top Ten Mistakes in Web Design.

Anyways, its back for the ones who think it could be a fun little thing to add anywhere, and now with AngularJS… let me just add, that I think it would be a horrible idea to put it in any website short of being a tribute website to horrible websites from the 80′s…


var blink = angular.module('blink', [])
    .directive('blink', function($timeout) {
    return {
        restrict: 'E',
        transclude: true,
        scope: {},
        controller: function($scope, $element) {
            function showElement() {
                $element.css("display", "inline");
                $timeout(hideElement, 1000);
            }

            function hideElement() {
                $element.css("display", "none");
                $timeout(showElement, 1000);
            }
            showElement();
        },
        template: '<span ng-transclude></span>',
        replace: true
    };
});​

Using it from HTML would be as simple as this…


<div ng-app="blink">
    <blink>Forward Thinking</blink>
</div>​

You can check out the JSFiddle here…
http://jsfiddle.net/qy7Bt/59/

The initial implementation was created by Søren Kyndi-Wiuff and it was then later refined to support a more mature version of AngularJS by Misko Hevery, both guys heavy-weight contributors to AngularJS… helped along the way by Mr. Ganaraj who was kind enough to point out and illustrate deprecated parts of the AngularJS…

Check out AngularJS if you haven’t done so yet and you are in the process of working on HTML systems, this is how HTML would have been if it had been created for Applications…
angularjs.org

Tagged , , ,
Follow

Get every new post delivered to your Inbox.

Join 521 other followers