最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery實(shí)現(xiàn)的支持IE的html滑動條

 更新時(shí)間:2015年03月16日 11:03:52   投稿:hebedich  
本文給大家分享的是一段使用jQuery實(shí)現(xiàn)支持IE的html滑動條代碼,效果非常不錯(cuò),這里推薦給大家,希望大家能夠喜歡。

復(fù)制代碼 代碼如下:

<html>
<script type="text/javascript" src="jquery.js"></script>
<style>
.d_b{
    height: 20px;
    width: 10px;
    display: inline-block;
    background-color: black;
    position: relative;
    vertical-align: middle;
    top: -15px;
    left: -5px;
}
</style>
<div id="d" style="width:200px;cursor: pointer;" max=100 min=0 value=10 >
<div style="height:10px; width:100%; background-color:green" ></div>
<b class="d_b"></b>
</div>
<b id="text"></b>
<script>
var $dom = $(document);
$dom.on('mousedown','#d',function (argument) {
    $(this).data('mouse','down');
    console.log('down');
})
$dom.on('mouseup',function(){
    $('#d').data('mouse','up');
    console.log('up');
});
$dom.on('mousemove','#d',function(event){
    if($(this).data('mouse') == 'down'){
        var m_x = event.clientX;
        var d_b = $(this).find('.d_b');
        m_x = m_x < 8 ? 8 : m_x;
        m_x = m_x > 208 ? 208: m_x;
        d_b.css('left',m_x-13);
        var max = $(this).attr('max');
        $(this).attr('value', Math.floor((m_x-8)/200 * max))
        console.log($(this).attr('value'));
        $('#text').text($(this).attr('value'))
    }
});
</script>
</html>

效果圖:

以上就是本文的全部內(nèi)容了,希望能夠?qū)Υ蠹覍W(xué)習(xí)使用jQuery有所幫助。

相關(guān)文章

最新評論

鸡东县| 宜州市| 共和县| 永仁县| 舟曲县| 伊金霍洛旗| 仁布县| 罗田县| 福清市| 平南县| 大荔县| 如东县| 类乌齐县| 通化县| 中超| 临漳县| 青阳县| 海南省| 甘孜| 泰州市| 华阴市| 类乌齐县| 江北区| 乌拉特后旗| 健康| 岑溪市| 瑞安市| 永州市| 荃湾区| 峨山| 临沭县| 河东区| 扬中市| 曲阳县| 雷波县| 蒙山县| 丰县| 綦江县| 宁乡县| 息烽县| 白沙|