Giter VIP home page Giter VIP logo

Comments (8)

blivesta avatar blivesta commented on June 4, 2024

try this

$(".animsition").animsition({
  linkElement : 'a:not([href^="#"])'
});

from animsition.

gauravpadia avatar gauravpadia commented on June 4, 2024

This will also ignore a link to another page with hash.

Please let me know if you have an another idea to fix this too.

Thanks a lot.

from animsition.

gauravpadia avatar gauravpadia commented on June 4, 2024

@blivesta
No it did not worked for me on Wordpress because Wordpress prints full URL with hash. Like http://example.com/post/#comment-1

from animsition.

blivesta avatar blivesta commented on June 4, 2024

Do you not be able to put the class in the comments link in Wordpress Plugin that you are developing now?
If it can be ...

$(".animsition").animsition({
  linkElement : 'a:not([href^="#"]):not(.animsition-link-false)'
});

from animsition.

gauravpadia avatar gauravpadia commented on June 4, 2024

Thanks for your help. I managed to print full URL with wordpress and done like this:

$( '.animsition' ).animsition({
  linkElement: 'animsition-link, a[href]:not([href^="http://example.com/post/#"])'
});

from animsition.

blivesta avatar blivesta commented on June 4, 2024

There is also a link, such as the following wordpress.

http://example.com/?p=3#comments
http://example.com/cat/0000.html#comments

specify in the suffix matching conditions of the "href"

$( '.animsition' ).animsition({
  linkElement: 'a:not([href$="#comments"])'
});

from animsition.

blivesta avatar blivesta commented on June 4, 2024

OR

$( '.animsition' ).animsition({
  linkElement: 'a:not([href*="#comments"])'
});

from animsition.

gauravpadia avatar gauravpadia commented on June 4, 2024

Your last second message about suffix is not required as my full URL with # will work for those case also. So my final code is:

$( '.animsition' ).animsition({
    linkElement: '.animsition-link, a[href]:not([href^="http://example.com/post/#"]):not([href^=#]):not([href*=javascript])'
});

You can close this issue. Thank you!

from animsition.

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.