You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
821 B

  1. // JavaScript Document
  2. var inSec1Con = null;
  3. $(document).ready(function(){
  4. inSec1Con = $('.inSec1Con');
  5. resizes();
  6. var indSec1T = $('.indSec1T');
  7. //面包屑点击
  8. $('.crumbs').click(function(){
  9. if(indSec1T.hasClass('active')){
  10. indSec1T.removeClass('active');
  11. }else{
  12. indSec1T.addClass('active');
  13. }
  14. })
  15. })
  16. $(window).resize(function(){
  17. resizes();
  18. })
  19. function resizes() {
  20. inSec1Con.addClass('inSec1Con1').removeClass('inSec1Con3');
  21. var obj = null;
  22. if($(window).width() > 1500){
  23. obj = inSec1Con.filter(function(index) {
  24. return index % 4 == 3;
  25. });
  26. }else{
  27. obj = inSec1Con.filter(function(index) {
  28. return index % 3 == 2;
  29. });
  30. }
  31. obj.addClass('inSec1Con3').removeClass('inSec1Con1')
  32. }
  33. //找出宿舍楼号
  34. function floorName(str,len){
  35. return str.substr(0,str.length-len);
  36. }