簡體   English   中英

獲取jquery滑塊內容以保持可見,直到鼠標移出(新內容)

[英]Get jquery slider content to remain visible until mouseout (of new content)

我正在嘗試使用jquery顯示隱藏內容的滑塊。 可以在此頁面上的視頻下方的圖像上看到它, 網址為http://www.thesun.net/FallOkanaganWineFestivals/Indexaspx.aspx 一切工作正常,除了我希望隱藏的內容保持可見,直到鼠標移出新的內容區域,而不僅僅是圖像上的熱點。

我已包含以下代碼,非常感謝您的幫助。

<div style="margin-left:10px;">
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_01.jpg);" id="feature1img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature1text"><h3>BC Wine Awards Reception & Tasting</h3>
<p>Join us for this rare treat event which kicks off our 2011 Fall Okanagan Wine Festival. This event will include the announcement of the award winning wines from our 2011 Fall Judging Competition. This medal winning wines competition sponsored by Richards Packaging, Meyers Norris Penny, Farm Credit Canada and Container World is judged by world renowned judges judging the wines produced by our member wineries. The announcement will be followed by a reception including fabulous tapas and canapés and the opportunity to be one of the few to taste a selection of some of these award-winning wines while you still can. Many winemakers and wineries will be in attendance, so this is also a great chance to meet the award winners themselves. Judging website www.OkanaganWineAwards.com tickets: selectyourtickets.com 250.717.5304</p>
<h4>Cost:</h4>
<p>$50.00(all incl)</p>
<h4>Location</h4>
<p>The Rotary Centre for the Arts<br />
421 Cawston Ave.<br />
Kelowna, BC V1Y 6Z1 Canada</p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_02.jpg);" id="feature2img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature2text">
<h3>WestJet Wine Tastings</h3>
<p>Sip! Sample! Spit! Join the WestJet team and explore some This event is for those who want to explore some of the finest wines that are being produced right here in Okanagan Wine Country. A great event for those trying wines for the first time as well as those who want to expand their wine knowledge. There are over 40 wineries present and over 150 wines to sample. Ticket includes: souvenir wine glass, all your wine tasting, bread and cheese, a free taxi ride home and the wonderful fun culture of WestJet airlines. This event always sells out buy your tickets early!! This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets at: selectyourtickets.com or 250.717.5304</p>
<h4>Cost:</h4>
<p>$65.00(all incl)</p>
<h4>Location</h4>
<p>The Rotary Centre for the Arts<br />
421 Cawston Ave.<br />
Kelowna, BC V1Y 6Z1 Canada</p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_03.jpg);" id="feature3img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333;  padding:10px;" id="feature3text">
<h3>WestJet Wine Tastings</h3>
<p>Sip! Sample! Spit! Join the WestJet team and explore some This event is for those who want to explore some of the finest wines that are being produced right here in Okanagan Wine Country. A great event for those trying wines for the first time as well as those who want to expand their wine knowledge. There are over 40 wineries present and over 150 wines to sample. Ticket includes: souvenir wine glass, all your wine tasting, bread and cheese, a free taxi ride home and the wonderful fun culture of WestJet airlines. This event always sells out buy your tickets early!! This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets at: selectyourtickets.com or 250.717.5304</p>
<h4>Cost:</h4>
<p>$65.00(all incl)</p>
<h4>Location</h4>
<p>The Rotary Centre for the Arts<br />
421 Cawston Ave.<br />
Kelowna, BC V1Y 6Z1 Canada</p>

</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_04.jpg);" id="feature4img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature4text">
<h3>FortisBC Salute To Food and Wine</h3>
<p>FortisBC presents an exciting new evening that will showcase the region's leading culinary talents and great Okanagan wines. The venue could not be any better – The Wild Apple Restaurant at Manteo Waterfront Resort in Kelowna. Join Chef Bernard from the Wild Apple, Mathew Batey from Mission Hill Family Estate and two other guest chefs as they prepare local cuisine in small plates paired with some of the most storied wineries in the Okanagan. Each chef will also conduct a live cooking demonstration using natural gas and patrons get to take home the chef's recipes. Inspired food, innovative wines, and spectacular views make this event a wonderful time for friends to celebrate together. This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets online at: selectyourtickets.com</p>
<h4>Cost:</h4>
<p>$85.00(all incl)</p>
<h4>Location</h4>
<p>Manteo Resort<br />
3762 Lakeshore Rd<br />
Kelowna, BC Canada</p>

</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_05.jpg);" id="feature5img">&nbsp;</div>
<div style="width: 880px; height:235px; display: none; background-color: #333; padding:10px;" id="feature5text">
<h3>All You Need Is Cheese & Wine – The Seminar</h3>
<p>Imagine the sensory experience of the beautiful colors of autumn in the Okanagan.  Join us to utilize your senses to enjoy a pairing of unique Canadian cheeses with some of the finer white and red wines of the region. Hosted by Dairy Farmers of Canada, this event features dedicated pairings that will be memorable.  Nostrala, Boerenkaas, Tiger Blue and Rathtrevor are some of the cheeses you will learn about in the seminar.  Although informal, it is presented by a cheese expert and wine educator. This event  will definitely improve your knowledge of these fine Canadian products. We look forward to having a wonderful evening with you.</p>
<h4>Cost:</h4>
<p>$45.00(all incl)</p>
<h4>Location</h4>
<p>Manteo Resort<br />
3762 Lakeshore Rd<br />
Kelowna, BC Canada</p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_06.jpg);" id="feature6img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature6text">
<h3>Battle of the Wine Experts</h3>
<p>For you wine lovers and those who have an insatiable curiousity, welcome to our first ever panel of wine experts who will argue, debate and perhaps throw grapes at each other as they debate the merits of Meritage in the Okanagan. You will get to taste and compare 6 different Red Meritage wines from the Okanagan, ask questions of the panel as they offer their opinions of the development of this wonderful red blend that has become a successful brand for Okanagan wineries worldwide. And the setting for learning and talking could not be better. The Mary Irwin Theatre at the Rotary Centre for the Arts will allow you to sit back and relax while you taste the wines at the same time as the panel. After the panel discussion, we will close the event with a food and wine reception to allow all panellists and guest to network and exchange their favourite stories.</p>
<h4>Cost:</h4>
<p>$50.00(all incl)</p>
<h4>Location</h4>
<p>The Rotary Centre for the Arts<br />
421 Cawston Ave.<br />
Kelowna, BC V1Y 6Z1 Canada</p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_07.jpg);" id="feature7img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature7text"><h3>All You Need Is Cheese…. and some Wine!</h3>
<p>Cheese lovers rejoice! Sure to please any cheese lover; join Dairy Farmers of Canada and Okanagan Wineries as you walk about the Okanagan Heritage Museum visiting our cheese and wine stations. Guests will enjoy Canadian cheeses paired with fabulous wines. This event will be fun, relaxing, educational and guaranteed to have you leaving with a shopping list of your new favourite cheeses. This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets available at selectyourtickets.com or 250.717.5304.</p>
<h4>Cost:</h4>
<p>$55.00(all incl)</p>
<h4>Location</h4>
<p>Watermark Beach Resort<br />
15 Park Place<br />
Osoyoos, BC V0H1V0 </p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_08.jpg);" id="feature8img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature8text">
<h3>Alexis de Portneuf presents "The Young Chefs"</h3>
<p>Never before has this been done! Alexis de Portneuf is challenging nine BC Interior young Chefs to get creative. The challenge is to create an appetizer, main or dessert course using cheese. Guests will sample these creations and will vote for their favourite. The Okanagan Chefs Association will also select the winner of the Saputo Top Young Chef Award. Join us as we see the best young culinary talent in action. This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets at: selectyourtickets.com or 250.717.5304</p>
<h4>Cost:</h4>
<p>$55.00(all incl)</p>
<h4>Location</h4>
<p>Culinary Arts Centre at Okanagan College<br />
1000 KLO Road<br />
Kelowna, BC V1Y2A7 Canada</p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_09.jpg);" id="feature9img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature9text">
<h3>Valley First Grand Finale Consumer Tastings</h3>
<p>Valley First brings you the oldest and largest event of the fall wine festival. This is a wine tour under one roof!!! Sip! Sample! Spit? Dance? This event is for those who want to explore some of the finest wines that are being produced right here in our back yards. A great event for those trying wines for the first time as well as those who want to expand their wine knowledge. There are over 60 wineries present and over 240 wines to sample. Ticket includes: enjoyable live entertainment, souvenir wine glass, all your wine tasting, bread and cheese and a free taxi ride home. This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets at valleyfirsttix.com or 877.763.2849</p>
<h4>Cost:</h4>
<p>$62.00(all incl)</p>
<h4>Location</h4>
<p>Penticton Trade & Convention Centre<br />
273 Power St<br />
Penticton, BC </p>
</div>
<div style="width: 900px; height: 50px; background-image: url(http://www.thesun.net/Pics/Promo/okwine/featuredevents_10.jpg);" id="feature10img">&nbsp;</div>
<div style="width: 880px; height: 235px; display: none; background-color: #333; padding:10px;" id="feature10text">
<h3>Valley First Grand Finale Consumer Tastings</h3>
<p>Valley First brings you the oldest and largest event of the fall wine festival. This is a wine tour under one roof!!! Sip! Sample! Spit? Dance? This event is for those who want to explore some of the finest wines that are being produced right here in our back yards. A great event for those trying wines for the first time as well as those who want to expand their wine knowledge. There are over 60 wineries present and over 240 wines to sample. Ticket includes: enjoyable live entertainment, souvenir wine glass, all your wine tasting, bread and cheese and a free taxi ride home. This is a get home safe event, sponsored by BC Liquor Stores and the Johnston Meier Insurance Group. Tickets at valleyfirsttix.com or 877.763.2849</p>
<h4>Cost:</h4>
<p>$62.00(all incl)</p>
<h4>Location</h4>
<p>Penticton Trade & Convention Centre<br />
273 Power St<br />
Penticton, BC </p>
</div>
<div>
<script type="text/javascript"><!--
$("#feature1img").mouseover(function() {
    $("#feature1text").clearQueue();
    $("#feature1text").slideDown("slow");
  }).mouseout(function(){
    $("#feature1text").mouseout().slideUp("slow");
  });

$("#feature2img").mouseover(function() {
    $("#feature2text").clearQueue();
    $("#feature2text").slideDown("slow");
  }).mouseout(function(){
    $("#feature2text").mouseout().slideUp("slow");
  });

$("#feature3img").mouseover(function() {
    $("#feature3text").clearQueue();
    $("#feature3text").slideDown("slow");
  }).mouseout(function(){
    $("#feature3text").mouseout().slideUp("slow");
  });

$("#feature4img").mouseover(function() {
    $("#feature4text").clearQueue();
    $("#feature4text").slideDown("slow");
  }).mouseout(function(){
    $("#feature4text").mouseout().slideUp("slow");
  });
  $("#feature5img").mouseover(function() {
    $("#feature5text").clearQueue();
    $("#feature5text").slideDown("slow");
  }).mouseout(function(){
    $("#feature5text").mouseout().slideUp("slow");
  });
  $("#feature6img").mouseover(function() {
    $("#feature6text").clearQueue();
    $("#feature6text").slideDown("slow");
  }).mouseout(function(){
    $("#feature6text").mouseout().slideUp("slow");
  });
  $("#feature7img").mouseover(function() {
    $("#feature7text").clearQueue();
    $("#feature7text").slideDown("slow");
  }).mouseout(function(){
    $("#feature7text").mouseout().slideUp("slow");
  });
  $("#feature8img").mouseover(function() {
    $("#feature8text").clearQueue();
    $("#feature8text").slideDown("slow");
  }).mouseout(function(){
    $("#feature8text").mouseout().slideUp("slow");
  });
  $("#feature9img").mouseover(function() {
    $("#feature9text").clearQueue();
    $("#feature9text").slideDown("slow");
  }).mouseout(function(){
    $("#feature9text").mouseout().slideUp("slow");
  });
  $("#feature10img").mouseover(function() {
    $("#feature10text").clearQueue();
    $("#feature10text").slideDown("slow");
  }).mouseout(function(){
    $("#feature10text").mouseout().slideUp("slow");
  });
// --></script>
</div>
</div>

謝謝,K

我有更好的運氣來更改使用了哪些事件。

http://jsfiddle.net/CESzM/1/

的HTML

<div class='wrapper'>
    <div id="feature1img">&nbsp;</div>
    <div class="featureText"><h3>BC Wine Awards Reception & Tasting</h3>
        <p>Join us for this rare treat event which kicks off our 2011 Fall Okanagan Wine Festival. This event will include the announcement of the award winning wines from our 2011 Fall Judging Competition. This medal winning wines competition sponsored by Richards Packaging, Meyers Norris Penny, Farm Credit Canada and Container World is judged by world renowned judges judging the wines produced by our member wineries. The announcement will be followed by a reception including fabulous tapas and canapés and the opportunity to be one of the few to taste a selection of some of these award-winning wines while you still can. Many winemakers and wineries will be in attendance, so this is also a great chance to meet the award winners themselves. Judging website www.OkanaganWineAwards.com tickets: selectyourtickets.com 250.717.5304</p>
        <h4>Cost:</h4>
        <p>$50.00(all incl)</p>
        <h4>Location</h4>
        <p>The Rotary Centre for the Arts<br />
            421 Cawston Ave.<br />
            Kelowna, BC V1Y 6Z1 Canada</p>
        </div>
        </div>

的CSS

.featureText{width: 880px; height: 235px; display: none; background-color: #333; padding:10px;}
#feature1img{width: 900px; height: 50px; background-color:black;}

JS

$(".featureText").hide();
$(".wrapper").hover(function() {
    $(this).find(".featureText").stop(true, true).slideDown("slow");
},function() {
    $(this).find(".featureText").stop(true, true).slideUp("slow");
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM