English 中文(简体)
Jquery(原始)的改动内容
原标题:Change content with Jquery (Paginate)
  • 时间:2012-01-11 16:37:57
  •  标签:
  • jquery

每个人都在试图修改这一文字的2天之内,即只要有“假想”的链接当然会失败,就可以称之为“新字”。

确切地说,试图做的是,即使该联系在“无争议”内,这一功能也要装上并改变“联系”。 与此类似。

  <div class="pagination">
    <a href="test.php">clik2</a>
  </div> 

我试图创建一种功能,把它称作Click,但一不成功。 如果该联系不属自愿联系,但也需要联系公司内部的工作,则该文字就完全有效。 任何想法?

(文件) 页: 1

var hash = window.location.hash.substr(1);
var href = $( .pagination a ).each(function(){
    var href = $(this).attr( href );
    if(hash==href.substr(0,href.length-5)){
        var toLoad = hash+ .html #content ;
        $( #content ).load(toLoad)
    }                                           
});

        $( .pagination a ).click(function(){

            var toLoad = $(this).attr( href )+  #content ;
            $( #content ).hide( 1000 ,loadContent);
            $( #load ).remove();
            $( #wrapper ).append( <span id="load"></span> );
            $( #load ).fadeIn( slow );
            window.location.hash = $(this).attr( href ).substr(0,$(this).attr( href ).length-5);
                function loadContent() {
                    $( #content ).load(toLoad,  ,showNewContent())
                }
                function showNewContent() {
                    $( #content ).delay(100).show( fast ,hideLoader());
                    $(window).scrollTop(  );
                }
                function hideLoader() {
                    $( #load ).delay(300).fadeOut( fast );
                }
            return false;
    });
});
最佳回答

If the link is being added with javascript, which I think is what you are trying to do then you need to use the live function. Currently you have

$( .pagination a ).click(

改为:

$( .pagination a ).live( click ,function() {

http://api.jquery.com/live/rel=“nofollow”>here。 点击问题在于,它没有被添加到职能确定后产生的要素中,因为现场是愿意的。

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签