use question

This is my first time really having to use jquery/ajax. This is what I need to do. I’m redoing my brother’s restaurant site, moving it more towards a database driven site, rather than separate pages.

But my question is this, I have a menu already there. What i’d like to be able to do is have a seamless transition. The problem for me is that not all the menu items will be running queries. For now, i’m going to leave them as they are until I can figure out how to move it into a database. That seems rather easy, but I can’t find anything on how to do it. Compounding the problem is this - to save space, I want the description to come up hidden, being shown by either clicking on the name or maybe a + next to the name (+ Double Cheese Burger).

I don’t have any js code to show, just the html


Welcome to Burger Impossible
<?php include 'inc/header.php'; ?>

<?php require_once 'inc/nav.php';?>

The query for the items would look something like (if I were doing it in php) [php]$qry = mysql_query(“SELECT * FROM items WHERE type = ‘$type’”) or die(mysql_error());[/php]
If someone can point me in the right direction, i’d appreciate it.

Did I post this in the wrong forum or something? Really need some help with this.

Well there really isn’t anything here so I can’t give any examples.

You would use either jQuery.ajax() or one of the .get() or .post() functions.

Then you could use the .show() and .hide() functions for your descriptions. You could possibly use the .toggleClass() function depending how you code it.

I’ll have to do some more research on this, I still have to get everything into tables first

Sponsor our Newsletter | Privacy Policy | Terms of Service