このサイトの誰かに、私が抱えていたスライダーの問題を解決してもらいました。パズルの最後のピースを手伝ってくれる人が必要です.
これはフィドルhttp://jsfiddle.net/gajjuthechamp/vrqdh/2/です
「サムネイル」をクリックすると、コンテンツが上のメイン div に表示されます。
「extraContent」の下の div/サムネイルには、「mainContent」の下に独自のコンテンツ div が必要です。
これが理にかなっていることを願っています。
ありがとう
jQuery:
$(function(){
$("#parent").on("click", ".extraContent div", function(){
newHtml=$(this).html();
$("#parent").find(".mainContent p").fadeOut(1000,function(){
$(this).parent().html(newHtml);
$(this).parent().fadeIn(1000);
});
});
});
HTML:
<div id="parent">
<div class="mainContent"> <p>This is the default Text</p></div>
<div class="extraContent">
<div><p>test and Image Goes hear for 1 div</p></div>
<div><p>test and Image Goes hear for 2 div</p></div>
<div><p>test and Image Goes hear for 3 div</p></div>
<div><p>test and Image Goes hear for 4 div</p></div>
</div>
</div>
CSS:
#parent { width:400px; margin:auto}
.mainContent { width:430px; height:300px; border:1px solid #000;padding:5px; }
.extraContent {overflow:auto; width:450px;}
.extraContent div{float:left; width:90px; height:90px; border:1px solid #00F; margin:5px; padding:5px }
.extraContent div:hover { border:1px solid #0F0;cursor:pointer }