Giter VIP home page Giter VIP logo

Comments (9)

dannybrown73 avatar dannybrown73 commented on August 18, 2024 1

if this is the issue i was having of the pinned item getting stuck in one spot on resize, my hacky fix for this is to reset it on window resize with:

$(window).on('resize', function(){
        $('.mypinclass').attr('style', '').removeData('pin');
        $('.mypinclass').pin();
    });

from jquery.pin.

MindSculpt avatar MindSculpt commented on August 18, 2024

I actually don't see an instance where this isn't mandatory, as it breaks on any browser resizing. +1 for adding this into the plugin permanently.

from jquery.pin.

alexslade avatar alexslade commented on August 18, 2024

πŸ‘ @RoffeDH's fix works nicely. I've issued a PR to help.

from jquery.pin.

LostSenSS avatar LostSenSS commented on August 18, 2024

πŸ‘

from jquery.pin.

robertwbradford avatar robertwbradford commented on August 18, 2024

Thanks, @RoffeDH!

from jquery.pin.

custa1200 avatar custa1200 commented on August 18, 2024

Any chance of getting this rolled in. It's pretty broken without it. I am trying to pin an error status bar but it breaks on resize.

from jquery.pin.

ryandury avatar ryandury commented on August 18, 2024

@RoffeDH πŸ‘

from jquery.pin.

pmdevelopment avatar pmdevelopment commented on August 18, 2024

Maybe a better way than resetting:

$('.selector').pin({
    containerSelector: '.container'
});
$(window).on('resize', function () {
    $('.selector').width($('.container').width());
});

from jquery.pin.

ryscript avatar ryscript commented on August 18, 2024

I saw in the code that it looks addressed now, however, it didn't work as expected on my end, anyone having the same issue with the latest version? and what trick does work for you?

Thanks

from jquery.pin.

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.