(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    What I would like to see is the ability to have a base site navigation menu but all the menuitems be called from an Ajax file.

Return to Recent Questions


Q: What I would like to see is the ability to have a base site navigation menu with all the definitional entries (size, locations, icons, etc.) defined but all the menuitems be called from an Ajax file.

A: You cannot use ajax submenus for the top items.
But you can use several .js file, for example:

params.js //file with all menu parameters (size, locations, icons, etc.)
all code before
var menuItems = [
...
];
dm_init();

data_ajax1.js //data files for ajax submenus
data_ajax2.js
data_ajax3.js
...

main_data.js - data file with the following code:

var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();

You can also place this code into your html page directly (in the place where you want to have a menu):

<script type="text/javascript">
var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();





Return to Recent Questions

Related:
Best 46 Fresh CSS Themes Collection AMP Mobile Page Template Review  |  Perfect Responsive JS Website Templates Review  |  Top 54 Brand New jQuery Themes List  |  Beautiful JS Page Theme Review  |  46 Fantastic CSS3 Web Page Templates Overview  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Bootstrap Templates | best website builder software | top website builder | bootstrap buttons | css3 menu