123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- $('.seekinput_search span').on('mousemove',function(){
- $('.seekinput_option').show();
- })
- $('.seek_box').on('mouseleave',function(){
- $('.seekinput_option').hide();
- })
- $('.seekinput_option span').eq(1).attr('class','on');
- $('.seekinput_search input[qhid="2"]').show();
- $('.seekinput_option span').on('click',function(){
- $('.seekinput_search input[type="text"]').hide();
- var _html = $(this).html();
- $('.seekinput_search span i').html(_html);
- $('.seekinput_option').hide();
- $(this).attr('class','on').siblings().attr('class','');
- var _qhid = $(this).attr('qhid');
- $('.seekinput_search input[qhid="'+_qhid+'"]').show();
- $('.seek_input input[type="button"]').attr('buttonid',_qhid);
- $('.seekinput_search input[type="text"]').val("");
- })
- $('.seek_input input[type="button"]').on('click',function(){
- var _buttonid = $(this).attr('buttonid');
- var txt = $('.seek_input input[qhid="'+_buttonid+'"]').val();
- console.log(_buttonid);
- console.log(txt);
- if (txt != '') {
- switch(_buttonid)
- {
- case '1':
- window.open('/house/search?name='+ txt);
- break;
- case '2':
- window.location.href = '/video/videosearch?name='+ txt;
- break;
- }
-
- };
-
- })
- $(document).keydown(function(event){
- if(event.keyCode==13){
- $('.seek_input input[type="button"]').click();
- }
- });
- $(function(){
- function myFunction(cid){
- cid.each(function(){
- var _this=$(this)
- _this.find('video.video_list_main')[0].addEventListener("loadedmetadata", function(){
- var tol = this.duration;
- var time = parseInt(tol);
- var minutes = parseInt(time / 60);
- var seconds =( time - minutes * 60);
- _this.find('.time_b').html(Appendzero(minutes)+':'+Appendzero(seconds))
- })
- })
- }
- function Appendzero (obj) {
- if (obj < 10) return "0" + obj; else return obj;
- }
- myFunction($('.videosearch_box ul li'));
- });
|