jim.ellison
Member
Posted 3 years ago #
We have our own pop-up script that will display a gallery of photos in as an external browser sized to fit the pix and their wrapper.
It works fine on our regular web site (http://www.roanoke.com/sports/college/wb/198505 and scroll down to click on the photo galleries) but does not behave that way in WordPress. See this: http://blogs.roanoke.com/rtblogs/test/2009/03/26/pop-up-pix/
How come? I think we're referencing the proper java script ... and we'd rather not double our work by using a wordpress popup plug-in.
Thanks in advance, Jim Ellison, Roanoke, Va.
Well there's 16 different Javascipt loading on that page, which one is suppose to handle the popup?
Adblock is blocking 3 of those by default... ad related...
jim.ellison
Member
Posted 3 years ago #
<script src="http://www.roanoke.com/js/global.js" type="text/javascript"></script>
is the operative script, and it is not ad related.
I'm no Javascript expert, but it looks like that Javascript is expecting a link with a particular class name.... depending on the popup type you want...
The link on the page you linked to does not have a class.
jim.ellison
Member
Posted 3 years ago #
Ah .... thanks, will investigate.
jim.ellison
Member
Posted 3 years ago #
Well, there's this in the java script:
// Actual popup function
function popUp() {
if (!document.getElementsByTagName) return false;
var lnks = document.getElementsByTagName("a");
for (var i=0; i<lnks.length; i++) {
if (lnks[i].className == "soundslide_popup") {
lnks[i].onclick = function() {
soundslideOpen(this.getAttribute("href"));
return false;
}
}
else if (lnks[i].className == "photogallery_popup") {
lnks[i].onclick = function() {
photogalleryOpen(this.getAttribute("href"));
return false;
That's gotta be the ticket. Otherwise, the sports galleries at http://www.roanoke.com/sports/college/wb/198505 wouldn't pop up.
Yep, that's the area i refer to...
I've not seen or used that script, but it certainly looks like it wants links with particular class names to function...
If you get it working be sure to mark the topic resolved to the right -->
Good luck... :)