Adding pages to pagekits

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

18-Feb-00 21:21
Hi,
I download the Taste 2 pagekit. I need to add two more pages to it.
How do I add a new menu tittle to the menu list at the top of each page. I'm kinda knew at this.


about_on = new Image ( 134, 94 );

about_on.src = "images/menu/about_on.gif";

What are the numbers in the ( ) referring to? Are they xy points?





21-Feb-00 09:35
Hi there!

To add a new menu title, you need to create 3 new images, because this menu changes two images when you roll over an item. You will need to create a "mouseover" graphic, a "mouseout" graphic, and a digit graphic (e.g. the number 7).

Say your new menu item is called "newitem". Then add the following JavaScript code to the page:

newitemroll = new Image(106, 68);
newitemroll.src = "images/menu/roll_7.gif";

newitem_on = new Image ( 134, 94 );
newitem_on.src = "images/menu/newitem_on.gif";

newitem_off = new Image ( 134, 94 );
newitem_off.src = "images/menu/newitem_off.gif";

Then in the body of the page itself, you'd add the following code to produce the new menu item on the page:

<td>
<a href="newitem.html"
onmouseout="button_off('newitem');
blank.src = blank2.src;
return true"
onmouseover="button_on('newitem');
blank.src = newitemroll.src;
return true">
<img src="images/menu/newitem_off.gif" border="0" name="newitem"></a></td>

To answer your second question: The numbers in ( ) refer to the width and height of the image (in pixels).

Hope that helps!

Best wishes,
Matt


--
Matt Doyle, Elated
Second Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated