Gix075 / jqueryIntroLoader

a jQuery plugin for generate animated Intro Loading Pages
GNU General Public License v3.0
48 stars 24 forks source link

Trying to stop inside an Ajax call. #3

Closed watherton closed 9 years ago

watherton commented 9 years ago

Hi there, loves this plugin, but need a little help.

I have div set to using the name: simplerLoader. I've set the stop: false, and fixed: false. When my Ajax call has finished calling out to the DB, I kill the loader using loader.stop();

All work, expect when I set fixed to false, then the loader doesnt show, and my whole sit has gone. If I remove fixed:false, then the loader works, but I can't stop it.

$('#btnSearchAPI').click(function () { $("#modalLoader").introLoader({ animation: { name: 'simplerLoader', options: { exitFX: 'slideUp', ease: 'easeInOutCirc', style: 'dark', stop: false, fixed: false }, spinJs: { lines: 10, length: 10, radius: 30, width: 8, color: '#fff' } } }); });

capture

Gix075 commented 9 years ago

I hope that i understand your problem. I think that it's happen because the loader was inside a parent that has not a specified height. When you use the option fixed:false the loader set his parent element to position:relative and overflow: hidden, and loader element to position:absolute.

So, in absolute position, if the loader parent has no height your loader will be not visible.

The fixed:false option is thinked for load the introLoader inside a div smaller than the whole page. If you need a whole page introloader, even you want to stop it manually, you can use fixed:true.

Let me know if this reply help you to solve the issue.

watherton commented 9 years ago

Thanks for the reply.

I shall give that a go. So, just setting the container with a height should sort it?

On Feb 26, 2015, at 12:21 PM, Gix075 notifications@github.com wrote:

I hope that i understand your problem. I think that it's happen because the loader was inside a parent that has not a specified height. When you use the option fixed:false the loader set his parent element to position:relative and overflow: hidden, and loader element to position:absolute. So, in absolute position, if the loader parent has no height your loader will be not visible. The fixed:false option is thinked for load the introLoader inside a div smaller than the whole page. If you need a whole page introloader, even you want to stop it manually, you can use fixed:true. Let me know if this reply help you to solve the issue. — Reply to this email directly or view it on GitHub.

Gix075 commented 9 years ago

I think yes. Try and let me know if this is a good solution.

Gix075 commented 9 years ago

Have you solved or not?

watherton commented 9 years ago

Hey Gix075,

Not had the chance yet. Was hoping to give it a go a little later on today.

I shall keep you posted.

Cheers

On 27 Feb 2015, at 14:36, Gix075 notifications@github.com wrote:

Have you solved or not?

— Reply to this email directly or view it on GitHub https://github.com/Gix075/jqueryIntroLoader/issues/3#issuecomment-76403525.