开发者

JQTouch/PHP problem - function isn't firing

开发者 https://www.devze.com 2023-03-05 11:59 出处:网络
I\'m very new to web development so forgive me for any obvious questions. I\'m having trouble getting this function to work. I\'ve been racking my brain for a while now.

I'm very new to web development so forgive me for any obvious questions. I'm having trouble getting this function to work. I've been racking my brain for a while now. I placed the php code in the url window and it displays the appropriate output so I know the php code is ok. I just can't get this function to display the query results into the "wine_categories" . Thanks in advance for all your help. Here's the code:

<script type="text/javascript">

    var jQT = new $.jQTouch();          


    function showtype(type)
    {
        $('wine_categories').children().remove();
        $.ajax({
            type:"POST",
            url:"get_winebot_type.php",
            success:function(html){
                $('#wine_categories').append(html);
            开发者_C百科    jQT.goTo('#wine_list', 'slide');
            }
        });

        return false;
    }

</script>

Here's the <div>:

<div id="wine_list">
    <div class="toolbar">
        <h1>Categories</h1>
        <a class="button back" href="#">Back</a>
    </div>
    <div id="wine_categories">
    </div>


The most obvious mistake I can see is this line:

$('wine_categories').children().remove();

You missed a hash in front of the ID:

$('#wine_categories').children().remove();
0

精彩评论

暂无评论...
验证码 换一张
取 消