|
Posted by BootNic on 04/10/07 23:44
> dorayme <doraymeRidThis@optusnet.com.au> wrote:
> news: doraymeRidThis-7FE7A2.08172111042007@news-vip.optusnet.com.au
> In article
> <tCQSh.20152$PL.17568@newsread4.news.pas.earthlink.net>,
> "BootNic" <bootnic@bounce.earthlink.net> wrote:
[snip]
>> // attach events
>> if( window.addEventListener ) {
>> window.addEventListener('load',floatCenter,false); //legacy
>> window.addEventListener('resize',floatCenter,false);
>> } else if( document.addEventListener ) {
>> document.addEventListener('load',floatCenter,false); //proper
>> document.addEventListener('resize',floatCenter,false);
>> } else if( window.attachEvent ) {
>> window.attachEvent("onload", floatCenter); //IE only
>> window.attachEvent("onresize", floatCenter);
>> }
[snip]
> Should the lines:
>
> if( window.addEventListener ) {
> window.addEventListener('load',checkCenter,false);
> window.addEventListener('resize',checkCenter,false);
> } else if( document.addEventListener ) {
> document.addEventListener('load',checkCenter,false);
> document.addEventListener('resize',checkCenter,false);
> } else if( window.attachEvent ) {
> window.attachEvent("onload", checkCenter);
> window.attachEvent("onresize", checkCenter);
> }
>
> be _replaced_ by your above?
I believe these are the same, the second one is just lacking the
comments.
Navigation:
[Reply to this message]
|