
February 13th, 2004, 04:53 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
to add a wrapper to AllWebMenu :( ?
I created a menus using AllWebMenu builder... there are 12 same-graphic-popUps each with a different text in it... and the best explanation I found so far on a wrapper is this...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxx
The wrapper functions is just the way to save download time and script maintenance hassles. For example you may have several menu items with the same looking graphic/text pop-up box, and the only difference is the text inside. The wrapper function receives the text as parameter and returns the HTML for whole pop-up box. The HTML of the pop-up can be divided in three parts: HTML code before the text, the text inside the box, and HTML code after the text. The basic wrapper function will look like this:
function wrapper (text) {
return 'HTML code before the text' + text + 'HTML code after the text'; }
now if you put call into the items structure:
wrapper(' some text of mine ')
the function will return:
'HTML code before the text some text of mine HTML code after the text';
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx
it looks great but I only understand the HTML code and the text part... and I need to put this function somewhere into my ".js" menu script and and my menu items and... I do not know which line I should copy it into...
is there a javascript expert in Toronto I could talk to...?
Please advise... -Thanks!
|