BioTorrents.de’s version of Gazelle
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.

centerLeft.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. $.noty.layouts.centerLeft = {
  2. name : 'centerLeft',
  3. options : { // overrides options
  4. },
  5. container: {
  6. object : '<ul id="noty_centerLeft_layout_container" />',
  7. selector: 'ul#noty_centerLeft_layout_container',
  8. style : function() {
  9. $(this).css({
  10. left : 20,
  11. position : 'fixed',
  12. width : '310px',
  13. height : 'auto',
  14. margin : 0,
  15. padding : 0,
  16. listStyleType: 'none',
  17. zIndex : 10000000
  18. });
  19. // getting hidden height
  20. var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
  21. $("body").append(dupe);
  22. dupe.find('.i-am-closing-now').remove();
  23. dupe.find('li').css('display', 'block');
  24. var actual_height = dupe.height();
  25. dupe.remove();
  26. if($(this).hasClass('i-am-new')) {
  27. $(this).css({
  28. top: ($(window).height() - actual_height) / 2 + 'px'
  29. });
  30. }
  31. else {
  32. $(this).animate({
  33. top: ($(window).height() - actual_height) / 2 + 'px'
  34. }, 500);
  35. }
  36. if(window.innerWidth < 600) {
  37. $(this).css({
  38. left: 5
  39. });
  40. }
  41. }
  42. },
  43. parent : {
  44. object : '<li />',
  45. selector: 'li',
  46. css : {}
  47. },
  48. css : {
  49. display: 'none',
  50. width : '310px'
  51. },
  52. addClass : ''
  53. };