2011-12-19 10 views
0

jqModalウィンドウにjScrollPane pluginを追加しようとしていますので、AJAXを介してコンテンツを読み込んだときに、設定された高さ(600px)よりスクロールペインの作業ができるようになりました。問題は初めての場合にのみ期待される結果である。その後のTESTリンクへの各リクエストはjqModalウィンドウのデータをロードしますが、jScrollPaneはロードされませんが、何か問題が起こったというエラーや警告はありません。そう....ここではいくつかのコードです:jqModalウィンドウのjScrollPaneは初めてです

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
    <head> 
     <title>test</title> 
     <link rel="stylesheet" media="screen" type="text/css" href="/css/jqmodal.css" /> 
     <link rel="stylesheet" media="screen" type="text/css" href="/css/jquery.jscrollpane.css" /> 
     <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script> 
     <script type="text/javascript" src="/js/jqmodal.js"></script> 
     <script type="text/javascript" src="/js/jquery.mousewheel.js"></script> 
     <script type="text/javascript" src="/js/mwheelIntent.js"></script> 
     <script type="text/javascript" src="/js/jquery.jscrollpane.min.js"></script> 
     <script type="text/javascript"> 
      $('document').ready(function() { 
       var myShow = function(hash){ hash.w.fadeIn('2000',function(){ hash.o.show(); }); }; 
       var myHide = function(hash){ hash.w.fadeOut('2000',function(){ hash.o.remove(); $('#loading').show(); }); }; 
       var myLoad = function(){ $('#loading').hide(); $('#window_content').jScrollPane({showArrows: true}); }; 
       $('#window').jqm({ 
        modal: false, 
        trigger: '.link', 
        target: '#window_content', 
        ajax: '@href', 
        onShow: myShow, 
        onHide: myHide, 
        onLoad: myLoad 
       }); 
      }); 
     </script> 
    </head> 
    <body> 
     <div id="window" class="jqmWindow"> 
      <a href="#" class="jqmClose">Close</a> 
      <div id="loading">Loading...</div> 
      <div id="window_content"></div> 
     </div> 
     <a class="link" href="test.php">TEST</a> 
    </body> 
</html> 

そしてtest.phpをは単にのconsits:

<div>This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data. This is some test data.</div> 

のstackoverflowのユーザーが私を助けて。あなたは私の唯一の希望です。

答えて

1

Ah Hah!私が書類を見つけただけでしたら、私はすぐに投稿する必要はありませんでした。似たようなことを体験したことのある人のために。最初に文書を読んでください!笑しかし、この例では、ここに解決策があります。 myHide機能では、私はちょうど追加する必要がありました:それは適切に後続の呼び出しに再初期化されます

$('#window_content').jScrollPane().data().jsp.destroy(); 

ように。もう一度ありがとう!あなたは私を歓迎しますが、もう一度...最初に読んでください! :P(Docs | Destroy

関連する問題