so here the "Europe" is the name of the menu and "Italy" and "Uk" and "Germany" are the submenue for the Europe,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?let's say I want when a user click on Germany he or she can redirect to google.com because right now the click event is not working,please help.
Which widget or plug-in you are using to design the menu. Is it a kendoMenu plug-in if yes refer the url below. Which explains binding the JSON object for initializing the menu. Similare to "text", "imageUrl" it has "url" property which is used for navigation.
Benjaminsh
Member
1 Points
10 Posts
need help for Hyperlink in JavaScript
Dec 26, 2012 01:02 PM|LINK
Hi guys
I'm trying to create a website menu bar by using CSS and JavaScript,I got a sample code from a website like below:
<script>
$("#menu-images").({
dataSource: [
{
text: "Europe", imageUrl: "images/Europe.gif",
items: [
{ text: "Italy"},
{ text: "UK"},
{ text: "Germany"},
]
},
</script>
so here the "Europe" is the name of the menu and "Italy" and "Uk" and "Germany" are the submenue for the Europe,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?let's say I want when a user click on Germany he or she can redirect to google.com because right now the click event is not working,please help.
thank you and merry christmast.
chandrasheka...
Star
10258 Points
1760 Posts
Re: need help for Hyperlink in JavaScript
Dec 26, 2012 01:20 PM|LINK
Hi,
Which widget or plug-in you are using to design the menu. Is it a kendoMenu plug-in if yes refer the url below. Which explains binding the JSON object for initializing the menu. Similare to "text", "imageUrl" it has "url" property which is used for navigation.
http://docs.kendoui.com/getting-started/web/menu/overview
If you are not using kendoMenu can you post the plug-in/widget details which you are using.
Please try the answer for the post and finally Don't forget to click “Mark as Answer” on the post that helped you.
Benjaminsh
Member
1 Points
10 Posts
Re: need help for Hyperlink in JavaScript
Dec 26, 2012 01:57 PM|LINK
chandrashekar Thank you very much for your info,it was very helpful,And my problem has been solved already with the link that you provided.
Regards
"Benjamin"