Rollover images without flash

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • metaphysics
    New Member
    • May 2007
    • 59

    Rollover images without flash

    I found this site:

    http://k10k.net/

    Notice how the top menu has rollover images without flash. How is this done?

    Thanks.
  • Logician
    New Member
    • Feb 2007
    • 210

    #2
    Originally posted by metaphysics
    I found this site:

    http://k10k.net/

    Notice how the top menu has rollover images without flash. How is this done?.
    Rollover images without flash are commonplace. The particular visual effect is probably just an animated .gif

    Comment

    • metaphysics
      New Member
      • May 2007
      • 59

      #3
      Originally posted by Logician
      Rollover images without flash are commonplace. The particular visual effect is probably just an animated .gif
      If you look closely, it uses javascript. I just want to know how it's done. (it's clearly not an animated .gif - http://k10k.net/sections/menu/)

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        hi ...

        i hadn't a deep look at it seems to be a js-fade-in effect that is triggered by a click ... what is not to hard to code :) let me give you an example (just tested in firefox):

        [HTML]
        <html>
        <head>
        <style type="text/css">
        .base { background: black; color: white; border: 1px black black; }
        </style>
        <script type="text/javascript">
        function fade_in(obj) {
        var c = 0;
        var o = document.create Element('div');

        o.innerHTML = obj.innerHTML;

        o.style.backgro und = 'red';
        o.style.border = '1px solid white';
        o.style.positio n = 'fixed';
        o.style.top = obj.offsetTop;
        o.style.left = obj.offsetLeft;
        o.style.height = c + 'px';

        obj.appendChild (o);

        var resize_obj = function() {
        c++;

        if (c >= obj.offsetHeigh t - 1) {
        window.clearInt erval(intv);
        }

        o.style.height = c + 'px';
        };

        var intv = window.setInter val(resize_obj, 1);
        }
        </script>
        </head>
        <body>
        <div onclick="fade_i n(this);" class="base">
        test
        </div>
        </body>
        </html>
        [/HTML]
        kind regards

        Comment

        • metaphysics
          New Member
          • May 2007
          • 59

          #5
          It still does not seem to work. I get a lot of bugs when I try to do that. Any other ideas?

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            Originally posted by metaphysics
            It still does not seem to work. I get a lot of bugs when I try to do that. Any other ideas?
            the given example works in FF without any error ... what do you use?

            kind regards

            Comment

            • vodcoder
              New Member
              • Jul 2008
              • 2

              #7
              Rollovers without flash is a common thing on the net, as someone said earlier. There is the posssibility to accomplish this from CSS. There is a video tutorial on [removed] that might help you.

              Comment

              Working...