add.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. $("#cate-widget li").click(function(){
  2. $("#result").hide();
  3. $("#cate-widget li").removeClass("act");
  4. $(this).addClass("act");
  5. $("#rightbox .tab-content").hide();
  6. var name=$(this).attr("id");
  7. $("#"+name+"_con").show();
  8. })
  9. function find(){
  10. var rightbox=document.getElementById("rightbox");
  11. var content=rightbox.getElementsByClassName("tab-content");
  12. var result=document.getElementById("result");
  13. for(var i=0;i<content.length;i++){
  14. content[i].style.display="none"
  15. }
  16. result.style.display="block"
  17. }
  18. $('.close').click(function(){
  19. $(this).parent().next().children().children().children('video').trigger('pause');
  20. })
  21. $('.foot_close').click(function(){
  22. $('.foot_wrapper').css('display','none')
  23. })
  24. $('.qq_close').click(function(){
  25. $('.qq_bg').css('display','none')
  26. })
  27. $(function(){
  28. if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
  29. console.log(111)
  30. $('.qq_bg').hide()
  31. }
  32. })
  33. $('.visible-xs').click(function(){
  34. var isshow=$(this).siblings().children('.hoverbox').css('display')
  35. if(isshow=="none"){
  36. $(this).text('取消')
  37. $(this).siblings().children('.hoverbox').show()
  38. }else{
  39. $(this).text('预览')
  40. $(this).siblings().children('.hoverbox').hide()
  41. }
  42. })