Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery-to-如何始终显示“下一步”和“上一步”按钮?_Jquery_Next_Prettyphoto - Fatal编程技术网

Jquery-to-如何始终显示“下一步”和“上一步”按钮?

Jquery-to-如何始终显示“下一步”和“上一步”按钮?,jquery,next,prettyphoto,Jquery,Next,Prettyphoto,大家好,我正在使用Jquery,我希望在弹出幻灯片上始终显示“下一步”和“上一步”按钮,而不是让用户将鼠标悬停在上面。我认为应该通过更改css来完成,但我不知道要更改哪个部分来始终显示按钮 <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("area[rel^='prettyPhoto']").prettyPhoto();

大家好,我正在使用Jquery,我希望在弹出幻灯片上始终显示“下一步”和“上一步”按钮,而不是让用户将鼠标悬停在上面。我认为应该通过更改css来完成,但我不知道要更改哪个部分来始终显示按钮

      <script type="text/javascript" charset="utf-8">
        $(document).ready(function(){
            $("area[rel^='prettyPhoto']").prettyPhoto();

            $(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'slow',theme:'light_squarex',slideshow:3000, autoplay_slideshow: false});
            $(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'slow',slideshow:10000, hideflash: true});



            $("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
                custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
                changepicturecallback: function(){ initialize(); }
            });

            $("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
                custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
                changepicturecallback: function(){ _bsap.exec(); }
            });

        });
        </script>
         <style>
      div.light_squarex .pp_left ,
div.light_squarex .pp_middle,
div.light_squarex .pp_right,
div.light_squarex .pp_content { background: #fff; }

div.light_squarex .pp_content .ppt { color: #000; }
div.light_squarex .pp_expand { background: url(../images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.light_squarex .pp_expand:hover { background: url(../images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.light_squarex .pp_contract { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.light_squarex .pp_contract:hover { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.light_squarex .pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.light_squarex .pp_details { position: relative; }
div.light_squarex .pp_description { margin-right: 85px; }
div.light_squarex #pp_full_res .pp_inline { color: #000; }
div.light_squarex .pp_gallery a.pp_arrow_previous,
div.light_squarex .pp_gallery a.pp_arrow_next { margin-top: 12px !important; }
div.light_squarex .pp_nav .pp_play { background: url(../images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat; height: 15px; width: 14px; }
div.light_squarex .pp_nav .pp_pause { background: url(../images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat; height: 15px; width: 14px; }

div.light_squarex .pp_arrow_previous { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat; } /* The previous arrow in the bottom nav */
    div.light_squarex .pp_arrow_previous.disabled { background-position: 0 -87px; cursor: default; }
div.light_squarex .pp_arrow_next { background: url(../images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat; } /* The next arrow in the bottom nav */
    div.light_squarex .pp_arrow_next.disabled { background-position: -22px -87px; cursor: default; }

div.light_squarex .pp_next:hover { background: url(../images/prettyPhoto/light_square/btnNextplay.png) bottom right  no-repeat; cursor: pointer; } /* Next button */
div.light_squarex .pp_previous:hover { background: url(../images/prettyPhoto/light_square/btnPrevious.png) bottom left no-repeat; cursor: pointer; } /* Previous button */

div.light_squarex .pp_loaderIcon { background: url(../images/prettyPhoto/light_rounded/loader.gif) center center no-repeat; } /* Loader icon */ </style>

$(文档).ready(函数(){
$(“区域[rel^='prettypto']);
$(“.gallery:first a[rel^='prettypto']”).prettypto({动画速度:'slow',主题:'light_squarex',幻灯片放映:3000,自动播放幻灯片放映:false});
$(“.gallery:gt(0)a[rel^='prettypto']”);
$(“#自定义内容a[rel^='prettypto']:first”)。prettypto({
自定义标记:“”,
changepicturecallback:function(){initialize();}
});
$(“#自定义内容a[rel^='prettypto']:last”)。prettypto({
自定义标记:“”,
changepicturecallback:function(){u bsap.exec();}
});
});
左二等分灯,
二等分光方形pp中间,
第二部分:光的平方,
div.light_squarex.pp_内容{背景:#fff;}
div.light_squarex.pp_content.ppt{color:#000;}
div.light_squarex.pp_expand{背景:url(../images/prettypto/light_square/sprite.png)-31px-26px无重复;光标:指针;}/*展开按钮*/
div.light_squarex.pp_展开:悬停{背景:url(../images/prettypto/light_square/sprite.png)-31px-47px无重复;光标:指针;}/*展开按钮悬停*/
div.light_squarex.pp_contract{背景:url(../images/prettypto/light_square/sprite.png)0-26px不重复;光标:指针;}/*contract按钮*/
div.light_squarex.pp_contract:hover{background:url(../images/prettypto/light_square/sprite.png)0-47px不重复;游标:指针;}/*contract按钮悬停*/
div.light_squarex.pp_close{宽度:75px;高度:22px;背景:url(../images/prettypto/light_square/sprite.png)-1px-1px不重复;光标:指针;}/*关闭按钮*/
div.light_squarex.pp_详细信息{位置:相对;}
div.light_squarex.pp_description{右边距:85px;}
div.light#u squarex#pp#u full#res.pp#u inline{color:#000;}
第二部分光照平方图美术馆a.pp箭头,
div.light_squarex.pp_gallery a.pp_arrow_next{页边空白顶部:12px!重要;}
div.light_squarex.pp_nav.pp_play{背景:url(../images/prettypto/light_square/sprite.png)-1px-100px不重复;高度:15px;宽度:14px;}
div.light_squarex.pp_nav.pp_pause{背景:url(../images/prettypto/light_square/sprite.png)-24px-100px无重复;高度:15px;宽度:14px;}
div.light_squarex.pp_arrow_previous{背景:url(../images/prettypto/light_square/sprite.png)0-71px不重复;}/*底部导航中的上一个箭头*/
div.light_squarex.pp_arrow_previous.disabled{背景位置:0-87px;光标:默认;}
div.light_squarex.pp_arrow_next{背景:url(../images/prettypto/light_square/sprite.png)-22px-71px无重复;}/*底部导航中的下一个箭头*/
div.light_squarex.pp_arrow_next.disabled{背景位置:-22px-87px;光标:默认;}
div.light_squarex.pp_next:悬停{背景:url(../images/prettypto/light_square/btnNextplay.png)右下角不重复;光标:指针;}/*下一步按钮*/
div.light_squarex.pp_previous:悬停{背景:url(../images/prettypto/light_square/btnPrevious.png)左下角不重复;光标:指针;}/*previous按钮*/
div.light_squarex.pp_loaderIcon{背景:url(../images/prettypto/light_rounded/loader.gif)中心不重复;}/*加载器图标*/

您必须更改这些CSS选择器:

div.light_squarex.pp_next:悬停{背景:url(../images/prettypto/light_square/btnNextplay.png)右下角不重复;光标:指针;}/*下一步按钮*/

div.light_squarex.pp_previous:悬停{背景:url(../images/prettypto/light_square/btnPrevious.png)左下角不重复;光标:指针;}/*previous按钮*/


只需删除:鼠标悬停,默认情况下,箭头将显示,而无需鼠标悬停。

尝试此操作,指向图像的普通图库链接将显示以下内容:

<a href="assets/img/portfolio/work8.jpg" rel="prettyPhoto">

将其更改为:

<a href="assets/img/portfolio/work8.jpg" rel="prettyPhoto[gallery]">

rel=“prettypto[gallery]”将确保所有具有该[]的图像都将分组,从而在默认情况下显示下一个图像和后一个图像


如果没有它,它只会显示带有一个图像的灯箱。

谢谢!从Prettypto更改为Prettypto[gallery]带来了导航功能