$(function(){ $('#yii-debug-toolbar').hide(); $('img[alt="code"]').css({"width":"40%","margin":"0 auto"}); //单独处理二维码的问题样式 function getParams(url) { var theRequest = new Object(); if (!url) url = location.href; if (url.indexOf("?") !== -1) { var str = url.substr(url.indexOf("?") + 1) + "&"; var strs = str.split("&"); for (var i = 0; i < strs.length - 1; i++) { var key = strs[i].substring(0, strs[i].indexOf("=")); var val = strs[i].substring(strs[i].indexOf("=") + 1); theRequest[key] = val; } } return theRequest; } var objUrl = {}; //获取get参数 var url = window.location.href; var searchParams = ''; //最后拼接的参数 var urlParams = ''; var params = getParams(url); //获取get请求的参数 if(!$.isEmptyObject(params)){ $.each(params,function(key,val){ objUrl[key] = val; urlParams += key+'='+val+'&'; }) urlParams = urlParams.substring(0,urlParams.length - 1); searchParams = '&'+ urlParams; } // 相册ajax function index_lp (){ var html = ''; $('.hu_box ul').html('') $.ajax({ url: "/housech/albumlist", data:{hid:hid,album_id:album_id}, type: "POST", dataType: "json", success: function(data) {//请求成功完成后要执行的方法 if (data.code == 200) { html+=''; }; $('.hu_box').html(html); $('#zh_housetype-list ul li').eq(0).click(); } }); } var hid = $('.hu_main ul li').eq(0).attr('hid'); // 入口三亚区域模块 判断 if($.isEmptyObject(params)!= true) { album_id=params.tkid $('.hu_main ul li[value="'+params.tkid+'"]').click(); $('.hu_main ul li[value="'+params.tkid+'"]').attr('class','in').siblings().attr('class','') }else{ $('.hu_main ul li').eq(0).attr('class','in'); var album_id = $('.hu_main ul li').eq(0).attr('value'); }; index_lp(); $('.hu_main ul li').on('click',function(){ hid = $(this).attr('hid'); album_id = $(this).attr('value'); $(this).attr('class','in').siblings().attr('class','') $('.am-pureview-slider li').remove(); $('.am-pureview-nav li').remove(); index_lp(); $('.lg-outer').remove(); $('.lg-backdrop').remove(); $('body').removeClass('lg-on'); }) $('#zh_housetype-list').on('click','li',function(){ album_click(); }) function album_click(){ $("#lightgallery").lightGallery(); $('.optionMore').html(''); var Getoption = $('.find_nav_list'); $('.optionMore').append(Getoption.clone(true)); $('.optionMore').find('.find_nav_list').addClass('find_nav_list2'); $('.find_nav_list2 ul li').on('click',function(){ var _value = $(this).attr('value') $('.find_nav_list ul li').each(function(){ var _vl = $(this).attr('value'); if(_value == _vl){ $(this).addClass('in').siblings().removeClass('in'); } }) }) } }) $(function(){ $('#wdemo07').navbarscroll({ defaultSelect:0, scrollerWidth:3, fingerClick:0, endClickScroll:function(obj){ // console.log(obj.text()) } }); })