Commit 54f0f22c authored by Martin Gregor's avatar Martin Gregor
Browse files

oprava poziciovania popupu

parent 902e86c8
......@@ -66,7 +66,16 @@ $(function(){
$(this).removeClass('btn-default').addClass('btn-success');
$(this).next().removeClass('btn-danger').addClass('btn-default');
}
$(this).parent().find('input').hide().val('');
var input = $(this).parent().find('input');
if (input.is(':visible'))
{
var wrapper = $(this).parent().parent();
var position = wrapper.position();
position.left = position.left + 50;
position.top = position.top + 30;
wrapper.css({'top': position.top + 'px','left': position.left + 'px'});
}
input.hide().val('');
});
//kliknutie na inccorects
......@@ -93,6 +102,11 @@ $(function(){
var input = btn.parent().find('input');
if (input.length == 0)
{
var wrapper = btn.parent().parent();
var position = wrapper.position();
position.left = position.left - 50;
position.top = position.top - 30;
wrapper.css({'top': position.top + 'px','left': position.left + 'px'});
input = btn.parent().parent().parent().parent().parent().parent().next();
if (word_n == 1)
{
......@@ -103,6 +117,14 @@ $(function(){
}
else
{
if (input.is(':hidden'))
{
var wrapper = btn.parent().parent();
var position = wrapper.position();
position.left = position.left - 50;
position.top = position.top - 30;
wrapper.css({'top': position.top + 'px','left': position.left + 'px'});
}
input.show();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment