Okay, sorry for the lousy title. The problem I am running into is with a javascipt which unobtrusively attaches a behavior to all elements that have the rel attribute of "popup." I have it so that it assigns a class and in doing so, it (the class) places a background image to the right of an external link to indicate the link will open in a new window. It works great but there is a problem with the way Explorer handles the icon--if the link text goes to two lines, the placement of the icon gets all messed up. There is a way around this--to add a conditional comment just for IE (zoom: 1)--which forces any two line text link to the next line so that the text remains all on one line. It's just not going to work for this particular site but I have found a way to add an icon through HTML that Explorer doesn't bork. My problem is that I don't know how to say to the javascript:
"When you find all elements that have the rel attribute of 'popup,' instead of doing this:
...add/append the following HTML and do it so that it ends up right before the closing a tag (like this: <a href="#" rel="popup">Link Text<span class="icon"> </span></a>):Code:// assigns a class so I can attach zoom conditionally for IE to solve 2 line problem popups[i].className = "popup"; }
Is there a javascript pro who can point me in the right direction?Code:<span class="icon"> </span>
(I'm using an adaptation of the script made available here: http://www.accessify.com/features/tu...perfect-popup/)



Reply With Quote


Bookmarks