But here's my next problem. I think it's a problem with this line, as indicated by the "resize":
checkBrowserWidth();
attachEventListener(window, "resize", checkBrowserWidth, false);
Basically the code is only executing if a user resizes his browser. How would I make it so the code checks...
That did work. I changed it to this and it worked:
if (theWidth < 915)
{
setStylesheet("globalsmall");
document.cookie = "farland_res_layout=" + escape("globalsmall");
var anchors = document.getElementsByTagName('a');
for (var loop=0, max=anchors.length; loop<max; loop++) {
var...
That seems like what I need, but I am having a bit of trouble making it work. Thanks for your patience with a newbie :).
The idea is to check browser width and call a separate style sheet if the browser is <915 res (code was modified from the Man in Blue's code).
What I'd like to do is...
Is there a way to use javascript to make a link point to a different place? In other words, I want to make all links to maps.html point to mapsthumbs.html under a certain condition.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.