Advertisement
Guest User

Corrige posição calendar extender IE

a guest
Aug 24th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * Corrige posição do calendar extender no IE (AjaxToolKit)
  3. */
  4. function CorrigePosicaoCalendarIE(idElemento, alturaInput) {
  5.     $('input[id*="' + idElemento + '"]').click(function() {
  6.         ResistrarInterval($(this), alturaInput);
  7.     });
  8.  
  9.     $('input[id*="' + idElemento + '"]').focus(function() {
  10.         ResistrarInterval($(this), alturaInput);
  11.     });
  12. }
  13.  
  14. function ResistrarInterval(campo, alturaInput) {
  15.     var intervalo = window.setInterval(function() {
  16.         if ($(".ajax__calendar_container").is(":visible")) {
  17.             $(".ajax__calendar_container").css('left', $(campo).position().left + 0);
  18.             $(".ajax__calendar_container").css('top', $(campo).position().top + alturaInput);
  19.             clearInterval(intervalo);
  20.         }
  21.     }, 50);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement