jQuery的图像滑块没有宽度的限制 [英] Jquery image slider without restriction of width

查看:94
本文介绍了jQuery的图像滑块没有宽度的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中使用了硬币滑块.但是硬币滑块受到宽度的限制.在我的应用程序中,我将文档分为两列.第一列仅包含硬币滑块.第二列包含登录名.面板.根据第二列的宽度,第一列进行了调整.我需要以各种屏幕尺寸(例如1280*768800*600)运行我的应用程序.jQuery中是否有任何图像滑块没有限制图像的宽度?请帮我.预先感谢.

I have used the coin slider in my application.But the coin slider is restricted by the width.In my application ,I have split the document into two columns.The first column only contains coin slider.The second column contains the login panel.According to the width of the second column,the first column was adjust.I need to run my application in various screen size like 1280*768,800*600.is there any image slider in jquery without restrict width of image?Please help me. Thanks in advance.

jQuery(document).ready(function() {
                    id = '#coin-slider1'.replace(/:/g, "\\:");
                    var sliderWidth="";
                    jQuery(id).coinslider({width:sliderWidth,height:screen.height/4,delay:500});
                })

推荐答案

在传递给插件的options数组中使用该值之前,请测量第一列的宽度...

Measure the width of the first column before using that value in the options array that you pass into the plugin...

jQuery(document).ready(function() {
    id = '#coin-slider1'.replace(/:/g, "\\:");
    var sliderWidth = $('#column1').width();
    jQuery(id).coinslider({width:sliderWidth,height:screen.height/4,delay:500});
})

这篇关于jQuery的图像滑块没有宽度的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆