I want to hide the thing that will promote it once you've wandered inside.
May 19, 2012 1:24 PM Subscribe
Iframes and CSS insertion. Help or a better idea?
So I'm making this map timeline that is slowly crystallizing into something beautiful. It Fancyboxes several hundred entries into an iframe on mouseovers. So far, so good.
My issue is that I know people will link to and stumble across the various independent entries and I want those entries to link back to the original map (so they can see that it's part of a big beautiful thing), but I don't want to interfere with them when they're viewed properly within the iframe.
So we have a link in the entry template with a link back to the map in a div with class siteinfo. Is there a way we can tell it to hide siteinfo only when it is viewed within the iframed map? Or is there a smarter way to do this? Suggestions that I convert over to some kind of ajax or other database related solution will be met with blank stares and silence (you can show yourself out).
Otherwise, it is going to be awesome when it is done.
So I'm making this map timeline that is slowly crystallizing into something beautiful. It Fancyboxes several hundred entries into an iframe on mouseovers. So far, so good.
My issue is that I know people will link to and stumble across the various independent entries and I want those entries to link back to the original map (so they can see that it's part of a big beautiful thing), but I don't want to interfere with them when they're viewed properly within the iframe.
So we have a link in the entry template with a link back to the map in a div with class siteinfo. Is there a way we can tell it to hide siteinfo only when it is viewed within the iframed map? Or is there a smarter way to do this? Suggestions that I convert over to some kind of ajax or other database related solution will be met with blank stares and silence (you can show yourself out).
Otherwise, it is going to be awesome when it is done.
Best answer: I'm not sure I fully understand the question, but:
if (window == window.parent) {
// I'm not in an iframe!
showLinkElement();
}
posted by tylerkaraszewski at 1:49 PM on May 19, 2012
if (window == window.parent) {
// I'm not in an iframe!
showLinkElement();
}
posted by tylerkaraszewski at 1:49 PM on May 19, 2012
This thread is closed to new comments.
posted by hobgadling at 1:46 PM on May 19, 2012