0

jQuery を使用した jQuery アラートで問題が発生しています。ページ読み込みの最初のページで、リンクをクリックすると、jQuery アラートが機能します。

しかし、2 ページ目をクリックしてリンクをクリックすると、1 ページ目に戻っても jQuery アラートが表示されません。

これはjQueryコードです:

jQuery(".textad_paginator").click(function(){


            var page =  jQuery(this).attr("id");

            var str = new String(page);
            var page = str.charAt( str.length-1 );

            var pages = jQuery("#txtad_pages").val();
            var txtadcount = jQuery("#txtadcount").val();
            var supplier_id = jQuery("#supplier_id").val();

            jQuery.ajax({  
                    type: "POST",  
                    url: publicdomainobj+"archives/directory_archive.obj.php",  
                    data: "supplier_id="+supplier_id+"&page="+page+"&type_list=textads",  


                    success: function(getdata){  



                            jQuery("#textad_archive_container").html('');
                            jQuery("#textad_archive_container").html(getdata);

                                jQuery("#more_textads").show(); 
                                jQuery(".textad_paginator").css("font-weight","normal");    
                                jQuery(".textad_paginator").css("color","#666666");                             
                                jQuery("#textad"+page).css("font-weight","bold");
                                jQuery("#textad"+page).css("color","#017F9A");


                            if(page<pages){
                                jQuery(".textad_count_indicator").html(page*10);

                            }else{
                                jQuery(".textad_count_indicator").html(txtadcount);             

                            }


                    } 
            });

            return false;
        });

        jQuery(".textads").click(function(){
            alert(jQuery(this).attr("id"));
        });

jQuery の規則やスクリプトに違反していませんか?

参照用のリンク、http://beta.bridalbook.ph/wedding-suppliers/tenstringedlyre PACKAGES セクションを参照してください

4

2 に答える 2

0

クリックを次のように変更してみてください。

jQuery(".textads").live('click', function(){
        alert(jQuery(this).attr("id"));
    });
于 2013-05-30T09:59:31.487 に答える