View Full Version : fish eye script
Chadi
05-22-2007, 12:48 AM
Can someone please explain how to use this in a custom area and one image per table cell?
http://www.ndesign-studio.com/blog/mac/css-dock-menu/#more-215
I posted a comment 2 days ago and apparently it did not go through.
Trinithis
05-22-2007, 04:35 AM
I don't know, but I would like it if someone explained the $ and the : stuff, as I am unfamiliar with that javascript syntax.
<script type="text/javascript">
$(document).ready(
function()
{
$(’#dock2′).Fisheye(
{
maxWidth: 60,
items: ‘a’,
itemsText: ’span’,
container: ‘.dock-container2′,
itemWidth: 40,
proximity: 80,
alignment : ‘left’,
valign: ‘bottom’,
halign : ‘center’
}
)
}
);
</script>
Bob90
05-22-2007, 11:04 AM
$ is just like any other variable. It can be used to name things. Ii think in Prototype it is a shortcut to document.getElementById().
As for the colon. It allows you to make an object.
object name: object properties.
This can be a function, string etc.
$ is just like any other variable. It can be used to name things.But shouldn't be: ECMA-262 says it should be reserved for machine-generated identifiers.
Ii think in Prototype it is a shortcut to document.getElementById().It does other things. It can select an element by ID, name, class, and various other criteria, I believe.
So if I had an object constructor for lets say ShortStoryNo, not a constructor, just a single instance of an object. For example:
var myobj = {
'prop1' : "somevalue",
'prop2' : "someothervalue"
};
myobj.prop1; // "somevalue"
myobj['prop2']; // "someothervalue"
Trinithis
05-22-2007, 04:57 PM
(I accidentally made a short post and deleted it)
Ok, I get it after putting it to the test on my machine.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.