123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- $(function(){
- $('#yii-debug-toolbar').hide();
- function index_lp (){
- var html = '';
- $('.m_album_r_lsit').html('')
- $.ajax({
- url: "/house/albumlist",
- data:{hid:hid,album_id:album_id},
- type: "POST",
- dataType: "json",
- success: function(data) {
- if (data.code == 200) {
- $.each(data.data, function (i, data) {
- html+='<div class="m_lsitImg" data-style="'+data.album_id+'" data-index="'+i+'"><img src="'+data.img+'" alt=""></div>';
- });
- };
- $('.m_album_r_lsit').html(html);
- $('.m_album_r_lsit .m_lsitImg').on('click',function(){
-
- var _dataStyle = $(this).attr('data-style');
- var _dataIndex = $(this).attr('data-index');
- console.log(_dataStyle);
- console.log(_dataIndex);
- window.location='/house/pvimage/'+hid+'?album_id='+_dataStyle+'&mindex='+_dataIndex+'&hid='+hid+'';
- })
- }
- });
- }
- function getUrlParam(name){
- var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if (r!=null) return decodeURI(r[2]);
- return null;
- }
- var hid = $('.m_album_l_title span').eq(0).attr('hid');
- var album_id = '';
- var _albumid = getUrlParam('album_id');
- if(_albumid){
- album_id = _albumid
- $('.m_album_l_title span[value="'+_albumid+'"]').attr('class','on');
- }else{
- album_id = $('.m_album_l_title span').eq(0).attr('value');
- $('.m_album_l_title span').eq(0).attr('class','on');
- }
- index_lp();
- $('.m_album_l_title span').on('click',function(){
- hid = $(this).attr('hid');
- album_id = $(this).attr('value');
- $(this).attr('class','on').siblings().attr('class','')
-
- index_lp();
-
- })
- var height =$(window).height() -155;
- $('.m_album_box').height(height);
- })
- var _dataid = $('.m_hq li.cur').attr('dataid');
- $('#mdemo06').navbarscroll({
- defaultSelect:_dataid,
- scrollerWidth:6,
- fingerClick:1,
- endClickScroll:function(obj){
-
- }
- });
|