PageSourceSearch

https://sumaity.com/js/top.js?v202610011246

js sumaity.com collected 2026-10-02 16:43:25 UTC 12,150 bytes, 326 lines download raw bytes

1//==============================================================================
2// ファイル名   : top.js
3// 機能         : トップ
4// 機能説明     :
5//==============================================================================
6
7
8//==============================================================================
9// 関数名       : -
10// 機能         : 初期化
11// 機能説明     :
12// 引数-1       : なし
13// 戻り値       : なし
14//==============================================================================
15$(function() {
16    
17    // クイック検索・都道府県変更
18    $('#quick_form select[name="pref_id"]').on('change', function(){
19        var pref_id = $(this).val();
20        if (!pref_id) return;
21        //路線
22        var url = '/top/getprefroute.php?pref_id=' + pref_id;
23
24        $.ajax({
25            url: url,
26            cache: true,
27            success: function(html){
28                $("#search_route").html('<span class="weight-bold">沿線</span>' + html);
29            }
30        });
31
32        //市区町村
33        url = '/top/getprefcity.php?pref_id=' + pref_id;
34
35        $.ajax({
36            url: url,
37            cache: true,
38            success: function(html){
39                $("#search_city").html('<span class="weight-bold">市区郡</span>' + html);
40            }
41        });
42    }).trigger('change');
43    
44    //検索種別のイベントを設定する
45    $('input[name="search_type"]').on('change', function(){
46        //枠を消す
47        $('#search_route,#search_city,#search_station').hide();
48
49        var furl = '';
50        //対象の枠を表示する
51        switch ($("input[name='search_type']:checked").val()) {
52            case '2':
53                //駅名
54                $('#search_station').show();
55                furl = '/chintai/line_list/list.php';
56                break;
57
58            case '0':
59                //沿線
60                $('#search_route').show();
61                furl = '/chintai/line_list/list.php';
62                break;
63
64            case '1':
65                //市区町村
66            case '3':
67                //地図
68                $('#search_city').show();
69                furl = '/chintai/area_list/list.php';
70                break;
71        }
72
73        if (furl) $('#quick_form').attr('action', furl);
74    }).trigger('change');
75
76    //リピーター向けの枠が存在するか?
77    if(document.getElementById('repeaterSearch')){
78        //路線から探す
79        $("#changelineBtn").on('click', function() {
80            $(".changeBlockWrapper").hide();
81            $("#lineSearch").show();
82            $(".changeBtnWrap li").removeClass("active");
83            $(this).parent("li").addClass("active");
84        });
85        //市区町村から探す
86        $("#changeAreaBtn").on('click', function() {
87            $(".changeBlockWrapper").hide();
88            $("#areaSearch").show();
89            $(".changeBtnWrap li").removeClass("active");
90            $(this).parent("li").addClass("active");
91        });
92        //前回検索した条件から探す
93        $("#changeRepeaterBtn").on('click', function() {
94            if($(this).hasClass('disabled')==false){
95              $(".changeBlockWrapper").hide();
96              $("#repeaterSearch").show();
97              $(".changeBtnWrap li").removeClass("active");
98              $(this).parent("li").addClass("active");
99            }
100        });
101        // ハッシュにより初期表示を変更
102        switch (location.hash ? location.hash.replace('#', '') : '') {
103            case 'searchArea':
104                $("#changeAreaBtn").trigger('click');
105                break;
106            case 'searchStation':
107                $("#changelineBtn").trigger('click');
108                break;
109        }
110    }
111    //こだわりの高さ揃え
112    $('ul.kodawari_list li p.KodawariTxt').flatHeights();
113    $('div.kodawari_list_under .kodawari').flatHeights();
114	//新着物件名
115    $('#recommendBox .estateBox .actBox p').flatHeights();
116
117
118	 /* サムネイルのクロップ */
119	$('.recommendEstate p.nailthumb-container').nailthumb({width:160,height:160,replaceAnimation:'null',method:'',fitDirection:'center center'});
120	 /* サムネイルのクロップ */
121	$('#recommendEstate p.nailthumb-container').nailthumb({width:165,height:165,replaceAnimation:'null',method:'',fitDirection:'center center'});
122	
123    //おすすめ物件のカルーセルパネル
124	$('.recommendEstate,#recommendEstate').jcarousel();
125	$('.jcarousel-next').bind('click',function(){
126    	$('.recommendEstate img,#recommendEstate img').show().lazyload();
127	});
128
129	 $('.recommendWrap .estateBox,#recommendBox .estateBox').hover(function(){
130		$(this).find('ul').stop(true, false).animate({top:0},100);
131		},function(){
132		$(this).find('ul').stop(true, false).animate({top:165},100);
133		});
134
135    // selectの大小入れ替え
136    $('select[data-pair-name]').on('change', function(){
137        var pair = $(this).parent().find('select[name="' + $(this).attr('data-pair-name') + '"]');
138        if ($(this).val().length <= 0) return;
139        if (pair.val().length <= 0) return;
140        var thisVal = parseInt($(this).val(), 10);
141        var pairVal = parseInt(pair.val(), 10);
142        // thisVal < pairVal であるべき
143        if ($(this).attr('name').match(/_low$/)) {
144            if (pairVal < thisVal) {
145                $(this).val(pairVal).trigger('change');
146                pair.val(thisVal).trigger('change');
147            }
148        // pairVal < thisVal であるべき
149        } else {
150            if (thisVal < pairVal) {
151                $(this).val(pairVal).trigger('change');
152                pair.val(thisVal).trigger('change');
153            }
154        }
155    });
156
157    //人気タブの切り替え
158    $('body').on('click', '.js-inner-tab-list_item', function() {
159        var index = $(this).parent().find('.js-inner-tab-list_item').index(this);
160
161        $(this).parent().find('.js-inner-tab-list_item').removeClass('is-active');
162        $(this).addClass('is-active');
163
164        $(this).parent().nextAll('.js-inner-tab-contents_item').addClass('is-visually-hidden');
165        $(this).parent().nextAll('.js-inner-tab-contents_item').eq(index).removeClass('is-visually-hidden');
166    });
167});
168
169//==============================================================================
170// 関数名       : startSuggest2
171// 機能         : サジェスト開始
172// 機能説明     :
173// 引数-1       : なし
174// 戻り値       : なし
175//==============================================================================
176function startSuggest2()
177{
178  new Suggest2.Local(
179        "id_stname_2",    // 入力のエレメントID
180        "suggest_station_2", // 補完候補を表示するエリアのID
181        list,      // 補完候補の検索対象となる配列
182        {dispMax: 10, interval: 1000, prefix:true}); // オプション
183}
184
185
186window.addEventListener ?
187window.addEventListener('load', startSuggest2, false) :
188window.attachEvent('onload', startSuggest2);
189
190//==============================================================================
191// 関数名       : stationSearchSubmit
192// 機能         : 駅検索サブミット
193// 機能説明     :
194// 引数-1       : なし
195// 戻り値       : なし
196//==============================================================================
197function stationSearchSubmit()
198{
199    if ($('#id_stname').val() == '' || $('#id_stname').val() == '例:新宿')
200    {
201        alert('駅名を入力してください');
202        return false;
203    }
204
205    return true;
206}
207
208
209
210//==============================================================================
211//[検索条件履歴のスライダー]
212//==============================================================================
213$(function(){
214    //検索履歴に数
215    var tabNum = $('.historyTitleTab').find('li').length;
216    if(tabNum==1){
217        $('.slideBtnPv').hide();
218        $('.slideBtnNx').hide();
219    }
220
221    //検索履歴ブロックのスライダー
222    function sliderSet(){
223        $('#history1').addClass('active').css('left',0);
224        $('#history2').css('left',718);
225        $('#history3').css('left',1436);
226        $('.slideBtnPv').hide();
227    };
228    sliderSet();
229    var sliderWidth = 718;
230
231    //「>」ボタン
232    function slideBtnNx(){
233        if($('#history1').hasClass('active')){
234            $('#history1').animate({left:-sliderWidth,display:'none'},200).removeClass('active');
235            $('#history2').animate({left:0},200).addClass('active');
236            $('#history3').animate({left:sliderWidth},200);
237            $('.historyTitleTab .historyTab1').removeClass('active');
238            $('.historyTitleTab .historyTab2').addClass('active');
239            $('.slideBtnPv').show();
240        }else if($('#history2').hasClass('active')){
241            $('#history1').animate({left:-sliderWidth*2},200);
242            $('#history2').animate({left:-sliderWidth},200).removeClass('active');
243            $('#history3').animate({left:0},200).addClass('active');
244            $('.historyTitleTab .historyTab2').removeClass('active');
245            $('.historyTitleTab .historyTab3').addClass('active');
246            $('.slideBtnNx').hide();
247        }
248    };
249
250    //「<」ボタン
251    function slideBtnPv(){
252        if($('#history2').hasClass('active')){
253            $('#history1').animate({left:0},200).addClass('active');
254            $('#history2').animate({left:sliderWidth},200).removeClass('active');
255            $('#history3').animate({left:sliderWidth*2},200);
256            $('.historyTitleTab .historyTab2').removeClass('active');
257            $('.historyTitleTab .historyTab1').addClass('active');
258            $('.slideBtnPv').hide();
259        }else if($('#history3').hasClass('active')){
260            $('#history1').animate({left:-sliderWidth},200);
261            $('#history2').animate({left:0},200).addClass('active');
262            $('#history3').animate({left:sliderWidth},200).removeClass('active');
263            $('.historyTitleTab .historyTab3').removeClass('active');
264            $('.historyTitleTab .historyTab2').addClass('active');
265            $('.slideBtnNx').show();
266        }
267    };
268
269    function tabNumberCountPv(){
270        if(tabNum==2){
271            $('.slideBtnNx').show();
272            $('.slideBtnPv').hide();
273        }
274    }
275
276    function tabNumberCountNx(){
277        if(tabNum==2){
278            $('.slideBtnPv').show();
279            $('.slideBtnNx').hide();
280        }
281    }
282
283    $('.slideBtnNx').click(function(){
284        slideBtnNx();
285        tabNumberCountNx();
286    });
287
288    $('.slideBtnPv').click(function(){
289        slideBtnPv();
290        tabNumberCountPv();
291    });
292
293    //タブで切り替えた時
294    $('.historyTitleTab li').on('click',function(){
295        $('.historyTitleTab li').removeClass('active');
296        $(this).addClass('active');
297        if($(this).hasClass('historyTab1')){
298            $('#history1').animate({left:0},200).addClass('active');
299            $('#history2').animate({left:sliderWidth},200).removeClass('active');
300            $('#history3').animate({left:sliderWidth*2},200).removeClass('active');
301            $('.slideBtnPv').hide();
302            if(tabNum!=1){
303                $('.slideBtnNx').show();
304            }else{
305                $('.slideBtnNx').hide();
306            }
307        }else if($(this).hasClass('historyTab2')){
308            if(tabNum==2){
309                $('.slideBtnNx').hide();
310                $('.slideBtnPv').show();
311            }else{
312                $('.slideBtnPv').show();
313                $('.slideBtnNx').show();
314            }
315            $('#history1').animate({left:-sliderWidth},200).removeClass('active');
316            $('#history2').animate({left:0},200).addClass('active');
317            $('#history3').animate({left:sliderWidth},200).removeClass('active');
318        }else{
319            $('#history1').animate({left:-sliderWidth*2},200).removeClass('active');
320            $('#history2').animate({left:-sliderWidth},200).removeClass('active');
321            $('#history3').animate({left:0},200).addClass('active');
322            $('.slideBtnPv').show();
323            $('.slideBtnNx').hide();
324        }
325    });
326});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.