this worked for me,
var e = document.createElement('STYLE');
e.type = 'text/css';
document.head.appendChild(e);
//moo 1.11 window.ie
if(*window.ie*) e.styleSheet.cssText = s.src; //s.src is the stylesheet
definition
else e.appendChild(document.createTextNode(s.src));


On Mon, Oct 19, 2009 at 12:17 PM, Dimitar Christoff <[email protected]>wrote:

>
> > did you try using class name for that ? there will be no need to
> > store/restore overflow
> > .hideOverflow {
> >
> > overflow: hidden
> > }
>
> although this is rather clever, i am trying to make it as css
> independent as possible - the function should be usable on any site
> irregardless of what styles there are. although... i suppose it can't
> hurt to require that of users...
>
> can you use mootools to add to styles?
>
> // add overflow class to css
>        new Element("style", {
>            type: "text/css",
>            html: ".overflowHidden { overflow: hidden; background: red}"
>        }).inject($(document.head));
>
> this does not seem to work...
> --
> Dimitar Christoff <[email protected]> - http://fragged.org/
>
>


-- 
http://tbela99.blogspot.com/

fax : (+33) 08 26 51 94 51

Reply via email to