I have a calendar http://tinyurl.com/bn9r6lk . (plugin: http://tinyurl.com/7axlse4)
the content loads through Lightbox Plus wp plugin.
Can't get the lightbox to work after any switching of the month. Even when I change back to the initial month.
Help is much appreciated.
I don't have any experience with Lightbox but for other plugins I am using a reload function after each Ajax request. Please, check jQuery.getScript.
$.getScript("plugins/lightbox.js");
Related
I have a website where I am switching from addThis to addToAny for social sharing buttons. The problem is that the share buttons are contained in content that is loaded dynamically with jquery Waypoints infinite scroll feature (which uses Ajax). When the page first loads (so no Ajax called yet) everything works great, but when a user scrolls and more content is added that contain the share buttons, the new buttons don't work in that they don't show the share options on hover or click.
There are supposedly fixes for this if using templates from the likes of Drupal or Wordpress, but my site is not built using any of these templates. This was also a known issue with addThis, and to get around the problem you simply need to add 'addthis.toolbox('.addthis_toolbox')' into the success portion of the ajax call and things would work.
I haven't had any success getting addToAny to work after ajax returns. They have something that looked promising: a2a.init('page'), but that doesn't work. Has anyone had this problem and have any suggestions on how to fix it? Thanks!
If there so many share button on one page you can call this after ajax success:
$(".a2a_dd").each(function() {
a2a.init('page');
});
Or if there only one share button, you can use this after ajax success:
a2a.init('page');
If want to know more details go through this document
According to the AddToAny API (https://www.addtoany.com/buttons/api/), you should use a2a.init_all(); if you are loading a number of new share button sets at once via AJAX.
Using a2a.init('page'); only initializes the last uninitialized buttons instance on the page. That might be fine for you, depending on how many new buttons that you load at a time.
Example: you have a blog site that loads new posts when the user scrolls to the end of the page. If you are only loading one new set of share buttons for the new content, a2a.init('page'); should work. If instead, you are loading a few new posts at a time, that each get their own set of share buttons, you will want to use a2a.init_all();
Hope this helps someone!
I'm working on a website that uses html5's push- and popstate in combination with ajax-calls to create a website that dynamically loads in Wordpress posts and pages, without causing a page refresh.
I've got that working fine, but I would love it if the black Wordpress toolbar/adminbar that shows at the top of the site when you're logged in as an admin, also reflected the change of content. Is there any way at all to make this happen? So that when I go from a post to page, for example, the "edit" link in the admin bar updates.
I don't think it's as easy as I hope it is, and if it can't be worked out I think I'll just disable the adminbar on the front-end. But it could be that I'm missing something.
Thanks in advance!
I'm working on this myself. I'm gonna build an ajax action and jquery function to do this. I will post here when it's done. For NOW i've instructed my users to just refresh to get the edit link. if you're using HTML5 history then you're on the permalink you want anyways. refresh and let the server regenerate the bar. not perfect but not terrible.
another option is to put edit post links in your template.
My site is http://armandwho.com/site
I'm using the Adv. Ajax Page Loader Plugin in order to keep my background vid & music uninterrupted while browsing.
I'm having trouble with the "LOOK" page. When navigating to it from the homepage (1st link), the gallery doesn't load at all. However, when you refresh or go directly to the page URL it works.
Within the plugin, there is an area for jQuery reload codes, which I think will load the needed scripts that don't get loaded when using the nav.
Can anyone make sense of what script I might need to "reload" to get my gallery working with this Ajax plugin?
Help is supremely appreciated!
Joe
I loved the music, so I decided to look into the problem a bit.
I stepped through the code for the plugin as it tried to load the page and came across this line:
//Nothing like good old pure JavaScript...
document.getElementById(AAPL_content).innerHTML = output;
..which is a problem because the javascript in the script tags isn't going to be run. You could change it to:
//Nothing like good old pure JavaScript...
jQuery(document.getElementById(AAPL_content)).html(output);
..and jQuery will handle the dirty work.
I using Opencart CMS. I was apply Opencart version Mobile by using Jquery mobile.
All page working very well but Checkout page.
Jquery mobile working for the first load and no Modify. But when i choose "Modify" button and Submit it. The next page (Load via Ajax) will don't apply css and js.
I have tried using .page() , .trigger(create) methods ... and got nowhere.
Please help me!
I have the same problem with a multi-page template.
When I call $.mobile.changePage() the page loads just fine at first. On the second call the CSS is not loaded (or painted properly).
I am trying to get it so that when a link is clicked in my WordPress template, it will load that page content with AJAX without changing the page. It needs to load dynamically into my content area depending on which link is clicked.
I have never used AJAX before so I would love it if someone could help me out or point me in the right direction.
Thanks,
Wade
I was unable to get that "AJAX Page Loader 1.5" plugin to work with the latest version of Wordpress (currently 3.1.2).. so I did MUCH digging around and found this tutorial "How To AJAXify WordPress Theme" which was super easy to follow and worked like a charm!
This plugin works and will give clues to how it works: WordPress › AJAX Page Loader 1.5 « WordPress Plugins
If you have access to jQuery, you could start by checking out their AJAX API Reference. There are plenty of examples in there, too!