Click here to Skip to main content
15,868,306 members
Articles / Web Development / HTML

euDock 2.0.06 JScript Emulation of Dock style MAC OS X bar

Rate me:
Please Sign up or sign in to vote.
4.89/5 (38 votes)
19 Jun 2007LGPL31 min read 150.5K   1.1K   60   75
An Open Source (customizable) JavaScript Emulation of Dock style MAC OS X bar

Live Demo

[on-Line Examples] euDock

Introduction

euDock is a JavaScript emulation of the Dock style MAC OS X bar.
It uses PNG, GIF, JPG (or other Web type) images, objects and transformation functions. PNG images in Internet Explorer are supported.

Using the Code

euDock has a lot of features described in the tutorial.

In the following code, I show the basic configuration of euDock bar.

Place the following inside your <HEAD></HEAD> HTML tag:

HTML
<HEAD>
   <script language="JavaScript1.3" src="js/euDock.2.0.js"></script>
   <script language="JavaScript1.3" src="js/euDock.Image.js"></script>
</HEAD>

Later, place everywhere:

JavaScript
<script>
   euEnv.imageBasePath="js/";

   var dock = new euDock();
   
   dock.setBar({
        left      :{euImage:{image:"barImages/dockBg-l.png"}},
        horizontal:{euImage:{image:"barImages/dockBg-c-o.gif"}},
        right     :{euImage:{image:"barImages/dockBg-r.png"}}
       });
   
   dock.setIconsOffset(2);
           
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://www.codeproject.com"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://www.codeproject.com"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://www.codeproject.com"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://www.codeproject.com"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
   dock.addIcon(new Array({euImage:{image:"iconsEuDock/cube.png"}}),
                {link:"http://eudock.jules.it"});
</script>

I suggest you download the tutorial/demos and take a look at the features. I can't explain everything here.

History

Ver 2.0.06 (17 June 2007) features

  • BUG FIX: euDock will SURVIVE on Safari... (I don't have enough money for a Mac)
  • Added delete Icon feature
  • Added (optional) Target Link Location
  • Now Cursor Pointer will change
  • [Examples]

Ver 2.0.04 (9 November 2006) features

  • BUG FIX: euDock can (now) SURVIVE with all kinds of prototype scripts
  • Added euCENTER align feature to euLabel object
  • Added a NEW tutorial page
  • [EXTERNAL FUNCTIONS EXAMPLES]

Ver 2.0.02 (12 July 2006) features

  • Added new generic align functions (euCENTER euHORIZONTAL euVERTICAL)
  • [ALIGN EXAMPLES]

Ver 2.0 (6 July 2006) features

  • Various Effect objects
  • Improved performances with PNG images on Internet Explorer
  • Programmable zooming functions
  • New tutorial and examples

Ver 2.00a (28 June 2006) features

Ver 1.06 features

  • Hook and align to a fixed position
  • Some bug fixes

Ver 1.04 features

  • Hook and align to HTML objects

Ver 1.02 features

  • Screen align: top, bottom, left, right
  • Resizing images
  • Link to external events
  • Fading images

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Web Developer
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralNew Link Target in version 2.0.0.6 Pin
Inspector IT20-Jun-07 8:40
Inspector IT20-Jun-07 8:40 
GeneralRe: New Link Target in version 2.0.0.6 Pin
Pier...20-Jun-07 11:13
Pier...20-Jun-07 11:13 
Generalin asp.net how i generate clik event for enery image in the dock Pin
ram krishna pattnayak6-Jun-07 4:24
ram krishna pattnayak6-Jun-07 4:24 
GeneralRe: in asp.net how i generate clik event for enery image in the dock Pin
Pier...19-Jun-07 11:20
Pier...19-Jun-07 11:20 
GeneralAdd target element to clicks to work on frames. Pin
Mario Zaizar27-Feb-07 15:55
Mario Zaizar27-Feb-07 15:55 
GeneralRe: Add target element to clicks to work on frames. Pin
Pier...27-Feb-07 21:14
Pier...27-Feb-07 21:14 
QuestionNot working - Labels? Pin
vectran2-Feb-07 19:05
vectran2-Feb-07 19:05 
AnswerRe: Not working - Labels? Pin
Pier...2-Feb-07 23:45
Pier...2-Feb-07 23:45 
It seems that you don't have closed the parenthesis.

dock.addIcon(new Array({euImage:{image:"images/dock/5g.png"}}),
             {link:"http://www.nzipodrepairs.com/index.php?cPath=25"});


dock.addIcon(new Array({euLabel:{
                            object : {euImage:{image:"images/dock/5g.png"}},
                            txt : "iPod Generation 5";
                            style : "text-align : center; border : 5px dashed #9Fb6b6;",
                            anchor : euDOWN,
                            offsetX : 0,
                            offsetY : -120}}),
             {link:"http://www.nzipodrepairs.com/index.php?cPath=25"});

dock.addIcon(new Array({euImage:{image:"images/dock/4gp.png"}}),
             {link:"http://www.nzipodrepairs.com/index.php?cPath=25"});

GeneralDelete a Icon and replace image of selected icon Pin
jllopezm24-Nov-06 22:58
jllopezm24-Nov-06 22:58 
Generallarger initial start size Pin
heyitssteve19-Sep-06 16:03
heyitssteve19-Sep-06 16:03 
GeneralRe: larger initial start size Pin
Pier...19-Sep-06 21:48
Pier...19-Sep-06 21:48 
GeneralRe: larger initial start size Pin
heyitssteve20-Sep-06 13:34
heyitssteve20-Sep-06 13:34 
GeneralRe: larger initial start size [modified] Pin
Pier...20-Sep-06 21:04
Pier...20-Sep-06 21:04 
GeneralSmall Request [modified] Pin
Peter.Chan11-Jul-06 20:54
Peter.Chan11-Jul-06 20:54 
GeneralRe: Small Request Pin
Pier...11-Jul-06 22:15
Pier...11-Jul-06 22:15 
GeneralRe: Small Request Pin
Pier...12-Jul-06 0:16
Pier...12-Jul-06 0:16 
GeneralRe: Small Request [modified] Pin
Peter.Chan12-Jul-06 2:17
Peter.Chan12-Jul-06 2:17 
GeneralRe: Small Request [modified] Pin
Pier...12-Jul-06 6:52
Pier...12-Jul-06 6:52 
GeneralRe: Small Request Pin
Pier...13-Jul-06 0:18
Pier...13-Jul-06 0:18 
GeneralRe: Small Request Pin
Peter.Chan20-Aug-06 21:17
Peter.Chan20-Aug-06 21:17 
GeneralASCII ART [modified] Pin
Pier...12-Jul-06 0:39
Pier...12-Jul-06 0:39 
GeneralRequest for label Pin
Peter.Chan10-Jul-06 22:54
Peter.Chan10-Jul-06 22:54 
GeneralRe: Request for label Pin
Pier...11-Jul-06 2:21
Pier...11-Jul-06 2:21 
GeneralRe: Request for label Pin
Peter.Chan11-Jul-06 5:59
Peter.Chan11-Jul-06 5:59 
GeneralRe: Request for label Pin
Pier...11-Jul-06 6:26
Pier...11-Jul-06 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.