Hi guys

I got a code from a website header menue from a website,It's a combination of JS, and CSS.

Right now I have the following code:

<script>
                $("#menu-images").Menu({
                    dataSource: [
                    {
                         text: "Dashboard", imageUrl: "images/home.png",
                    },
                        {

                            text: "Catalog", imageUrl: "images/AdminCatalog.gif",
                            items: [
                                { text: "View Products"},
                                { text: "Add Product"},
                                { text: "Product Categories"},
                                { text: "Search Products"},
                                { text: "Promotion"},
                                { text: "Tags"},
                            ]
                        },
 </script>

so here the "Catalog" is the name of the menue and "View products" and etc are the submenue for catalog,which will be appear when you bring your mouse on it.
I do not know how can I give these fildes a link to the other page?because right now the click event is not working,please help.
thank you and merry christmast.

just check it once by placing

<a href="#">View Products</a>

instead of

View Products

and let me know the status

Hi radha

Do you mean

{ text: <a href="#"> "View Products" </a>},


Or


{ <a href="#"> text:"View Products" </a>},
?

anyway none of them are working,when I place it into my code the menu will no longer be appear.

My guess is you need to set another property in the items something like itemUrl, but we would need to see the rest of the JS code (the part that actually ouputs the HTML) to know exactly what it needs

no no not like that

try as follows

{ text: "<a href='#'> View Products </a> "  },

so it places hyper_link with text instead of only text (i think)

otherwise

try to do as GliderPilot said

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.