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

No-ajaxy not working for dynamically created content. #31

Open
sonill opened this issue May 2, 2014 · 2 comments
Open

No-ajaxy not working for dynamically created content. #31

sonill opened this issue May 2, 2014 · 2 comments

Comments

@sonill
Copy link

sonill commented May 2, 2014

I have a ".no-ajaxy" on dynamically created content but ajaxify-html5 does not seem to respect that.
Is there any workaround?

function do_something(){
$('.gallery-icon a').addClass('fancybox no-ajaxy').attr('rel', 'gallery');
}

above function is executed after every ajax requests.
I can verify that above class has been added into the element by looking in firebug.
But ajaxify-html5 seems to load that content with ajax too. How can i make sure '.no-ajaxy' class does work like expected.

@Nodws
Copy link

Nodws commented Oct 6, 2015

yeah, plugin is a pain, better to write your own

@dalecooper
Copy link

I know this is old, but I was facing the same issue and easily solved it by replacing line 149 to :

$content.html(contentHtml);
$content.find('a[href*=".jpg"], a[href*="jpeg"], a[href*=".png"], a[href*=".gif"]').addClass('no-ajaxy fancybox').fancybox();
$content.ajaxify().css('opacity',100).show();

So that all links pointing to an image will be "un-ajaxified" and "fancyboxied".
Hope that helps someone in the future.

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

3 participants