Skip to content

Commit

Permalink
Fix arrow positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
trentrichardson committed Feb 2, 2012
1 parent f58706c commit ea210b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
11 changes: 6 additions & 5 deletions default.css
Expand Up @@ -5,7 +5,7 @@
*/
.jqifade{
position: absolute;
background-color: #aaaaaa;
background-color: #777777;
}
div.jqi{
width: 400px;
Expand Down Expand Up @@ -64,17 +64,18 @@ div.jqi button.jqidefaultbutton{
.jqi .jqiarrow{ position: absolute; height: 0; width:0; line-height: 0; font-size: 0; border: solid 10px transparent;}

.jqi .jqiarrowtl{ left: 10px; top: -20px; border-bottom-color: #ffffff; }
.jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -5px; }
.jqi .jqiarrowtc{ left: 50%; top: -20px; border-bottom-color: #ffffff; margin-left: -10px; }
.jqi .jqiarrowtr{ right: 10px; top: -20px; border-bottom-color: #ffffff; }

.jqi .jqiarrowbl{ left: 10px; bottom: -20px; border-top-color: #ffffff; }
.jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -5px; }
.jqi .jqiarrowbc{ left: 50%; bottom: -20px; border-top-color: #ffffff; margin-left: -10px; }
.jqi .jqiarrowbr{ right: 10px; bottom: -20px; border-top-color: #ffffff; }

.jqi .jqiarrowlt{ left: -20px; top: 10px; border-right-color: #ffffff; }
.jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -5px; }
.jqi .jqiarrowlm{ left: -20px; top: 50%; border-right-color: #ffffff; margin-top: -10px; }
.jqi .jqiarrowlb{ left: -20px; bottom: 10px; border-right-color: #ffffff; }

.jqi .jqiarrowrt{ right: -20px; top: 10px; border-left-color: #ffffff; }
.jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -5px; }
.jqi .jqiarrowrm{ right: -20px; top: 50%; border-left-color: #ffffff; margin-top: -10px; }
.jqi .jqiarrowrb{ right: -20px; bottom: 10px; border-left-color: #ffffff; }

10 changes: 4 additions & 6 deletions jquery-impromptu.js
Expand Up @@ -297,11 +297,9 @@
left: offset.left + pos.x,
marginLeft: 0,
width: (pos.width !== undefined)? pos.width : null
},
function(){
top = (offset.top + pos.y) - ($.prompt.options.top.toString().indexOf('%') >= 0? (windowHeight*(parseInt($.prompt.options.top,10)/100)) : parseInt($.prompt.options.top,10));
$('html,body').animate({ scrollTop: top }, 'fast', function(){});
});
top = (offset.top + pos.y) - ($.prompt.options.top.toString().indexOf('%') >= 0? (windowHeight*(parseInt($.prompt.options.top,10)/100)) : parseInt($.prompt.options.top,10));
$('html,body').animate({ scrollTop: top }, 'slow', 'swing', function(){});
}
else{
$.prompt.jqi.css({
Expand Down Expand Up @@ -347,11 +345,11 @@
$.prompt.currentStateName = state;

$('.'+ $.prompt.currentPrefix +'_state').slideUp('slow')
.find('.'+ $.prompt.currentPrefix +'arrow').slideToggle();
.find('.'+ $.prompt.currentPrefix +'arrow').fadeToggle();

$('#'+ $.prompt.currentPrefix +'_state_'+ state).slideDown('slow',function(){
$(this).find('.'+ $.prompt.currentPrefix +'defaultbutton').focus()
.find('.'+ $.prompt.currentPrefix +'arrow').slideToggle();
.find('.'+ $.prompt.currentPrefix +'arrow').fadeToggle('slow');
if (typeof callback == 'function')
callback();
});
Expand Down

0 comments on commit ea210b0

Please sign in to comment.