0

I've searched the Web around, and maybe I overlooked the answer, but I'm having this problem a few days which I cannot solve.

I'm trying to create a dropdown menu in jQuery. When you hover over a category generated from the sql database, it should show only all list items from that category. As solution I thought to have queries in my jQuery for each list id item, which I get via .

Here is my code:

find_li.on('click', function()
    {
        //sub_menu.fadeIn(200);
        var dir = $(this).data('dir');

        console.log(dir);

        if (dir == 1)
        {
            console.log("1");

            //first query here    



        }
        else if (dir == 2)
        {
            console.log("2");
            //second query here
        }


    });

So I'd like to get the right category by ID from the database. Is there a way to get each row ordered by ID on each mouseover?

I hope I made myself clear.

Thanks.

4

0 に答える 0