Advertisement
Guest User

Untitled

a guest
Jul 31st, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. $(document).ready(function () {
  2.  
  3. $('.windowClass').click(function () { // <-- bind to all window elements with that class
  4. $.blockUI({
  5. message: $('#' + this.id + '_win'),
  6. css: {
  7. top: ($(window).height() - 40) /2 + 'px',
  8. left: ($(window).width() - 200) /2 + 'px',
  9. width: '200px',
  10. height: '40px'
  11. }
  12. });
  13. });
  14.  
  15. $('[id$=_close]').click(function () { //<-- gets all elements with id's that end with close
  16. $.unblockUI();
  17. return false;
  18. });
  19. });
  20. $(window).on('resize', function () {
  21. $('body').children('.blockMsg').css({
  22. top : ($(window).height() - 40) /2 + 'px',
  23. left : ($(window).width() - 200) /2 + 'px'
  24. });
  25. });​
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement