Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh retinajs after img src changed #279

Open
Honza-B opened this issue Apr 24, 2017 · 1 comment
Open

Refresh retinajs after img src changed #279

Honza-B opened this issue Apr 24, 2017 · 1 comment

Comments

@Honza-B
Copy link

Honza-B commented Apr 24, 2017

Hi, thanks for great plugin!

But I have a little issue with refreshing retinajs on image which has source image changed.

In event handler I have tried refresh retinajs this way:

slider.bind("slide.onafterswaped", function(e) {
    retinajs( $(e.target).find('img') ); 
});

Thanks for help!

@helenburns
Copy link

Is it possible for someone to comment on this please? I'm changing the src of an img tag dynamically with jquery but the new image is then fuzzy, calling window.retinajs(); doesn't help:

Original image in html:

<img src='./img/forward_dark.png' data-rjs='3' width='45' height='56' class='add_operation_next'/>

Code to change the src and make the image clear again:

$('.add_operation_next').attr('src', './img/forward_dark.png');
window.retinajs();

I've tried defining the image size in html, css and both. What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants