1

私の問題は:

パーティーのメインの写真をクリックすると、自分の内部からfotos1.asp電話をかける外部ページがあります。#fotos_dentroindex.asp

このメインの写真は別のdivの中にあり#fotosます。そして、私はこれを処理するためにいくつかのjqueryスクリプトを使用します。

そして私はいくつかのscrollBarスクリプトを持っています..それで何が起こりますか?

fotos1.aspの中には見えません#fotos_dentro

これが私のスクリプトです:

$(function(){

   $("#fotos_dentro").hide();

    $('.fotos1').live('click', function(e) {
        e.preventDefault();
        var h = $(this).attr('href');
        $.get(h, function() {
            $("#fotos").fadeOut("slow", function() {
                $("#fotos_dentro").show(function(){
                    $(this).load(h).fadeIn("slow", function(){
                        $("#mcs_container").mCustomScrollbar("vertical",400,"easeOutCirc",1.05,"30","yes","yes",10);
                    });
                });
            });
        });
    });
});

これが私のHTMLです:

<div class="conteudo">
    <!-- comeco sroll -->
    <div id="mcs_container" class="rolagem">
        <div class="customScrollBox">
            <div class="container">
                <div class="content">
                <div id="fotos_dentro"></div>
                <div id="fotos">
                    <!-- HERE IS MY ASP PROGRAMMING -->
                </div>
                </div>
            </div>
            <div class="dragger_container">
                <div class="dragger"></div>
            </div>
        </div>
    </div>
    <!-- fim scroll -->
</div>

これが私のサイトです:http://www.alsite.com.br/luxxx/-クリックしGALERIAて問題を確認してください。

4

1 に答える 1

1

.loadこの場合は冗長です。返されたhtmlを追加するだけです。

$(function() {

    $("#fotos_dentro").hide();

    $('.fotos1').live('click', function(e) {
        e.preventDefault();
        var h = $(this).attr('href');
        $.get(h, function(data) {
            $("#fotos").fadeOut("slow", function() {
                $("#fotos_dentro").html(data).fadeIn("slow", function() {
                    $("#mcs_container").mCustomScrollbar("vertical", 400, "easeOutCirc", 1.05, "30", "yes", "yes", 10);
                });
            });
        });
    });
});​
于 2012-07-18T14:31:23.353 に答える