Code Monkey home page Code Monkey logo

Comments (10)

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

Did some of your code get cut off there? The settings work fine for me with the default html. There are a couple of places I see that could get affected even with the preloader turned off. I'll go ahead and add those in later today and push a commit. Hope that makes it an easy fix.

from liquidslider.

nathangrdias avatar nathangrdias commented on August 15, 2024

I yes, just realized that my code get cut off, but the basis of the problem is that I am initializing the component after use innerHTML (just html on Jquery) to fill up the nav and the "content div".

That goes almost perfectly (I am heaving problems adjusting height as well) for regular screens (15" or higher) but when the screen is smaller the preloader pops up "forever" even tho the property is off on the constructor.

New Version:
I've downloaded the new version, and apparently the "small screen" problem has been solved, but the component itself stop working.

I tested with static content and it seems all right, but if I use generate the HTML (navs and content panels) using $("#myslider").html and after that $("#myslider").liquidSlider() I do not get any error but the slider isnt working at all. The navs and the arrows are not changin the slider.

Is there something specific that I should do to use html generated by javascript before initialize the slider?

from liquidslider.

nathangrdias avatar nathangrdias commented on August 15, 2024

And thank you for the support!

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

If you're changing the structure of the slider after page load, the scripts events wont be attached. This goes for any javascript. You can get it to work, but it's tricky. By not working, do you mean it wont slide? or it wont build properly, or...?

from liquidslider.

nathangrdias avatar nathangrdias commented on August 15, 2024

In my case, I am creating the slider only after the structure is created.

My code structure is like that:

buidData() {

var htmlStructure = "div>h2>header -close-h2>-div>Content -close-div> -close-div>.....(many divs and h2)"

$(mySliderDiv).append(htmlStructure);

$(mySliderDiv).liquidSlider();

}

The htmlStructure comes from the dataBase and that is the reason I am using ajax to load it and building the html necessary to load the slider, but I am just loading the slider after the structure is ok.

With the previous version of the component, everything goes perfectly when I am using a regular screen, but when the screen is small, the preloader never stops (and it is showing even if the property is off!). That is the only issue.

With the new version there is no controls working after the slider is built, but the preloader problem for small screen is solved.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

When you say you are "creating the slider", do you mean you are adding in the content only (after page load), or are you also adding in the frame (i.e the <div class="liquid-slider" id="slider-id"></div> as well?

If the controls worked before, it might be a different issue. All I did in the update was add in some conditionals that turn off features if they are disabled.

Are you getting any errors in the console?

Is your code online somewhere? If you don't want to share it publicly you can email me [email protected]

from liquidslider.

nathangrdias avatar nathangrdias commented on August 15, 2024

The frame (div class="liquid" id="slider-id") is already there, and I am using append/html to fill up the structure (the structure exemplified in the variable htmlStructure)

After fill up the structure in to my div slider-id I am creating the slider (calling the constructor), which means that in the moment I am calling the slide constructor the structure is exactly the same as in a static code.

But that is happening in the old version.

Using the new version, the slider is built, I got no problem using any screens but the slider functions are not working, I cannot slide, the arrows doesn't work, when I click in the nav bar the slider doesn't change. No js errors.
Seems like the functions are not attached to the elements, do I have to set any different options?

The public server won't be available soon, so I will sent you the e-mail.

Thank you for your support.

from liquidslider.

nathangrdias avatar nathangrdias commented on August 15, 2024

Kevin,

Apparently the problem with preloader on the previous version happens when the content inside the slider is not just a text (image, divs etc),

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

Two things. In your code, you have preLoader rather than preloader. But the issue with it not sliding is actually when continuous is false (and preloader:true). I'll have to look into it, but it might take a day or two.

For now though, know that the slider will work after the preloader shuts off (after page load), so it still might make sense from a ux standpoint.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

Try version 1.2.8, it should work now as expected

from liquidslider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.