Code Monkey home page Code Monkey logo

Comments (11)

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

Hey, what if you send someone to http://www.example.com/#second_slider_name ? Do you want it to do something then?

If not, then this might be what you are looking for.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

About the documentation, I'm waiting until I can test out some more bugs. Actually, I found (and fixed) one this morning. It wasn't properly applying the current class. You might want to grab the latest code.

from liquidslider.

CMCDragonkai avatar CMCDragonkai commented on August 15, 2024

If I do send someone a link like this "http://www.example.com/#second_slider_name" then of course, I would want it to go to the specific slide.

However when I just send them the link "http://www.example.com/", I prefer for the url not to automatically transform into "http://www.example.com/#first_panel_name".

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

I guess either way, that tutorial solves your concern :) Email me if you get stuck.

from liquidslider.

amadika avatar amadika commented on August 15, 2024

I'm looking for a fix to this same issue. I want the initial page load to not append the hashtag, because I'm using a scroll to hashtags on the page, and it automatically sends them to that area on page load instead of at the top. The old resolution links no longer work.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

I do it on this page here with the following code:

<a href="#" class="enable-hash">Enable Hash Linking</a>

$('#slider-4').liquidSlider({
    //hashLinking:true,
  });
  var api2 = $.data( $('#slider-4')[0], 'liquidSlider');
  $('.enable-hash').on('click', function(e){
    e.preventDefault();
    api2.options.hashLinking = true;
    api2.buildHashTags();
  });

That works for clicking on a button. You could probably put that code in the final callback and get your desired result.

callback: function() {
  this.options.hashLinking = true;
  this.buildHashTags();
}

from liquidslider.

amadika avatar amadika commented on August 15, 2024

How would that look to add to the callback? I've not used them before.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

Click the link I shared above and check the next section. It explains it there.

from liquidslider.

amadika avatar amadika commented on August 15, 2024

So, I put it here:

$('#main-slider').liquidSlider({
  continuous:false,
  crossLinks:true,
  dynamicTabs: true,
  hashLinking: true,
  dynamicArrows: false,
  slideEaseFunction:'animate.css',
  slideEaseDuration:500,
  heightEaseDuration:500,
  animateIn:"fadeInDown",
  animateOut:"fadeOutDown",
  callback: function() {
    this.options.hashLinking = true;
    this.buildHashTags();
  }
});
 var api2 = $.data( $('#main-slider')[0], 'liquidSlider');

But that doesn't appear to be working. Any suggestions?

from liquidslider.

amadika avatar amadika commented on August 15, 2024

Ah, realized I left hashlinking set to true. But that doesn't allow me to link to that specific section from another page directly if I want to, since it sets hashlinking only after page load.

from liquidslider.

KevinBatdorf avatar KevinBatdorf commented on August 15, 2024

I think what you want is to disable your script that does the scrolling, at least in the beginning. Maybe you could initialize that script within the Liquid Slider callback function?

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.