I want to create one menu with anchor tag
for e.g=> <a href="http://www.example.com/example.php" rel="facebox">Example</a>

I want to write javascript function for that like

$menu = array();
$menu = 'Page Title To be showed on page';

function MenuGen()
{
}

In addition I want to add FACEBOX from
http://www.electrictoolbox.com/jquery-facebox-basic-example/
or
http://www.dynamicdrive.com/dynamicindex4/facebox/index.htm

Please Help
Thanks!

Lets start by making an object.

var menu = {};
menu['page name without extension'] = 'Full url';
menu['a different page'] = 'Full url';
menu['and another'] = 'Full url';

Now you have two ways to work with the object. The first is menu and the second is menu.'the page name'. You set the value either way as menu = value; or menu.'the page name' = value;

I haven't tested this, so you may need to change things a little, but I think it's right.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.