I have a PHP page, in Wordpress. When I add a inline Thickbox to the page and attempt to open it, the Thickbox opens at the very bottom of the page, after the footer.
Strangely, I took the generated HTML code, and made an HTML file with it. That HTML file opens the Thickbox correctly. The only difference is that it is not being generated by wordpress. The links to JS scripts and everything are identical.
Anyone able to shed on light into this?
Turns out it was an old source of Thickbox. I tried uploading the lastest version, imported that one instead, and all is working.
Yay.
Related
I'm trying to implement Swup.js into a site in Oxygen for Wordpress. For some reason, the correct version of the site is not loaded when I use Swup.
For some reason, the correct version of the site is not loaded when I click the links. It seems to load a responsive version of the site instead. Here is the link to the page: https://testswup.kastanjeskolan.nu/ If you go to Our Services, you get one version of the page. But if you update/reload, you get the correct version. Here is a video to show what I mean.
Does anyone have any idea why this is happening?
Thanks for any help.
Swup JS only loads what's in the Swup element/Swup body. It keeps the same header or of the page for all the pages.
Oxygen builder generates CSS files for each page created. If you check page source of the Proucts page on your site, you'll see the CSS file for products page generated by Oxygen. (pointed in the image below).
Now when you move from Products page to Services page, this CSS file remains as is because it is in the section of site. And the CSS file for Services page is also not loaded because the is not refreshed, because that's how Swup works.
Solutions
Solution for this is having a single CSS file which contains all the CSS for all the pages. But not sure if that would be output by Oxygen builder.
Use the Head Plugin provided by Swup. Although not sure if it will work correctly with Oxygen Builder.
I'm trying to use Bootstrap-Switch to toggle my checkboxes. It works fine on a normal page, or a modal thats pre-loaded into the page.
However, if I load the modal from a remote page (a href=something.html) the toggle does not work/display. Apparently it loads once but doesn't reload after the modal is opened.
I tried
$("#myModal").on("shown.bs.modal",function(){
$(".checkbox").bootstrapSwitch();
});
But to no avail.
I've tried added the JS code directly to the code being pulled from the Modal as well but it didn't work. It worked on the remote page when loaded directly, but not through the Modal.
I'm a novice JS guy so this may be a trivial fix. Basically need to know how to call bootstrapSwitch() after the modal is loaded.
Thanks!
Just realized I had the shown.bs.modal called 2x for different things. When I combined, it fixed it. Bah, 30 minutes down the drain!
I know this is sort of a please debug my code question, but I really don't know whats going on here.
I just added the content to this page and now none of the external or internal links will work (eg you click on them and nothing happens). The Mega menu drop down works fine and I can click on links on it, but the links in the text dont work, and neither do any on the sidebars
Here is the page that is causing the problems
http://www.cookingisfun.ie/cookery-courses/course-details/101618/Guest-Chef-Diana-Kennedy-at-Kerrygold-Ballymaloe-Litfest
here is a similar page that has no issue.
http://www.cookingisfun.ie/cookery-courses/course-details/101364/Guest-Chef-Lilly-Higgins
I can click the Back to CourseList button which I Can't on the first.
This is not just a problem with my machine, I have tried from another machine and an Iphone with same result.
I can't see any javascript errors but I assume it is something to do with the plugin that marks the links as external though that plugin works elsewhere on my site.
Any suggestions?
I guess you have some errors in your HTML code (wrong nesting of tags or something or you did not close a tag right). If I want to inspect the "Back to course button" with Firefox I get the following
It seems that the #content-blocks div is empty. Also the source code view of your page underlines me some tags red:
Normally this means that there are some HTML errors. Here the output of the HTML validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cookingisfun.ie%2Fcookery-courses%2Fcourse-details%2F101618%2FGuest-Chef-Diana-Kennedy-at-Kerrygold-Ballymaloe-Litfest&charset=%28detect+automatically%29&doctype=Inline&group=0
I have a few Pretty Photo images in my app, but they are opening in a new page instead of in a PrettyPhoto display.
Here's the index of my app, which is stripped down of everything not nescessary to run it.
Click the down arrow in order to view the pretty photo page.
I use the jQuery version from the download. Also PrettyPhoto and it's script are initialised right before the closing div tag.
What could possibly be wrong with it? Why are the images opening in a new page?
Thx in advance!
It's because you are calling the plugin once the document is loaded but not after clicking on the down arrow.
If you go to your site. Click on the down arrow. Open the js inspector and copy/paste this
//jQuery.noConflict();
jQuery(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools: false,
theme: 'light_square'
});
});
You will see it's working.
So try to trigger the prettyPhoto once the pictures are loaded.
If you visit here: http://www.egyptevakantie.nl/dahab, click on the "andere plaatsen" tab, and then click on an image it brings up a magnified image, courtesy of the jQuery lightbox plug-in.
However, if you do the same here http://www.egyptevakantie.nl/dahab?rhys=yes (essentially the same site except for a couple of stylesheets and one or two minor html changes, none of which are in close proximity to the images) the lightbox fails. Instead of overlaying the content the lightbox is appended to the bottom of the page, where it is also displayed weirdly.
So far in debugging I've managed to work out that the plug-in still calculates the correct left and top values for where to place the lightbox, but by the time the dhtml is generated the top value has changed completely.
Does anyone have any idea why this is happening?
I think you are missing the jquery lightbox stylesheet file.
in the first page there is a reference to this css file:
/css/jquery.lightbox-0.5.css
but on the second link there is no reference to this file.
this css file is included in the jQuery lightbox download located here:
http://leandrovieira.com/projects/jquery/lightbox/
If image is appended at bottom page, for sure postion:absolute is not set.