main.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. // * @date 2017
  2. // * @author caiaolin
  3. // * @version
  4. //自动高度
  5. function autoFlashHeight(){
  6. $(".auto-height-1").height($(window).height()-115);
  7. $(".auto-height-2").height($(window).height()-154);
  8. };
  9. $(window).resize(autoFlashHeight);
  10. $(document).ready(function() {
  11. // menu
  12. $("#menu > li > a").click(function() {
  13. var self = $(this);
  14. var subMenu = $(this).siblings('ul.sub-menu');
  15. if(subMenu.length > 0) {
  16. if(subMenu.is(":visible")) {
  17. self.find('.menu-arrow').removeClass('glyphicon-menu-down').addClass('glyphicon-menu-right');
  18. subMenu.slideUp('fast');
  19. self.parent().removeClass('active');
  20. }else{
  21. self.parent().addClass('active');
  22. self.find('.menu-arrow').removeClass('glyphicon-menu-right').addClass('glyphicon-menu-down');
  23. subMenu.slideDown('fast');
  24. }
  25. }
  26. });
  27. /*工具提示*/
  28. $(function () {
  29. $('[data-toggle="tooltip"]').tooltip()
  30. });
  31. });