[Javascript] Code optimization
Terry Riegel
riegel at clearimageonline.com
Mon Aug 14 21:21:42 CDT 2006
> Pardon me asking, but what UA are you targeting with your aplication?
I am developing with safari. Then I will be testing with the other
browsers once I get the code somewhat functional.
> >Thanks to John Warner the cursor should be fixed. I was able to do
> it in CSS.
> No doubt about that, but "cursor: hand" will only do it in Explorer.
I got my info from http://www.echoecho.com/csscursors.htm
> Well, that's again one single event per element.
> So what does the Icon dblclick do?
Ah, I get it. From the one click I can determine the underlying
object. Ok that makes sense.
> >I have the click events working :) , but.... now I need to figure
> out how to put the icon before the text.
> >Any ideas on how I might do that.
> I first need to see how are you putting your icons currently.
> Seen it, its:
> o.insertBefore(newimg);
>
> Try:
> var filelist = o.parentNode//you can drop this line in IE
> filelist.insertBefore(newimg, o)
>
> This should do it, [!but only in case "o" is what I think it is!]
I tried that but it places the image before the div. Here is what I
am trying to build programatically:
<div class="NOR PRI DIR" id="images"></div>
to become...
<div class="NOR PRI DIR" id="images"><img src=".../small-
dir.gif">images</div>
I am able to get this...
<div class="NOR PRI DIR" id="images">images<img src=".../small-
dir.gif"></div>
Any other suggestions? As you can see I am able to get the image
placed after the div text, but havent figured out how to place it
before.
Terry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060814/f315ac97/attachment.htm>
More information about the Javascript
mailing list