content.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // var $parentNode = window.parent.document;
  2. // function $childNode(name) {
  3. // return window.frames[name]
  4. // }
  5. // // tooltips
  6. // $('.tooltip-demo').tooltip({
  7. // selector: "[data-toggle=tooltip]",
  8. // container: "body"
  9. // });
  10. // // 使用animation.css修改Bootstrap Modal
  11. // $('.modal').appendTo("body");
  12. // $("[data-toggle=popover]").popover();
  13. //判断当前页面是否在iframe中
  14. if (top == this) {
  15. var gohome = '<div class="gohome"><a class="animated bounceInUp" href="index.html?v=4.0" title="返回首页"><i class="fa fa-home"></i></a></div>';
  16. $('body').append(gohome);
  17. }
  18. //animation.css
  19. function animationHover(element, animation) {
  20. element = $(element);
  21. element.hover(
  22. function () {
  23. element.addClass('animated ' + animation);
  24. },
  25. function () {
  26. //动画完成之前移除class
  27. window.setTimeout(function () {
  28. element.removeClass('animated ' + animation);
  29. }, 2000);
  30. });
  31. }
  32. //拖动面板
  33. function WinMove() {
  34. var element = "[class*=col]";
  35. var handle = ".ibox-title";
  36. var connect = "[class*=col]";
  37. $(element).sortable({
  38. handle: handle,
  39. connectWith: connect,
  40. tolerance: 'pointer',
  41. forcePlaceholderSize: true,
  42. opacity: 0.8,
  43. })
  44. .disableSelection();
  45. };