I used similar things with
new Element(tagName, {style:...})
earlier, but after strange behavior of IE I prefer to use
new Element(tagName).setStyle({width:x,height:y})
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To view this
When I create a class like example below. How would I remove a class
so its not in memory.
namespace.Popup = Class.create(
{
initialize: function(params){
...
},
show:function(){
// create or show
}
});
I was thinking of creating this at the start of my application and
just
Hi,
It's unclear whether you're talking about removing the
`namespace.Popup` *class* (well, constructor function -- JavaScript
doesn't have classes), or removing the `popup` *instance* (object)
that you've created for a specific popover.
The short version:
If you want to remove the instance you
For Enumeration (Hash, ObjectRange etc.) use Enumeration#each
var index = -1;
enumeration.each(function(e, i) {
if (e === 'bar') {
index = i;
// looking for the first occurrence
throw $break;
}
});
for Array you can use shorter
var index = ['foo','bar','baz'].indexOf('bar');
Hi,
It may be a little slower as says Victor.
However, you may try to use part of the class to identify a
pluginclass and the other part for identifying the JS class to use.
Something like that:
$$(*[class^='plugin']).each(function(e) {
var jsClass = e.className.substr(6);
If indeed setStyle is working and not the former, then it would seem to me
that the issue could easily be traced back to the root of the problem.
Perhaps someone of the Prototype dev team can have a look into this.
Karl..
--
You received this message because you are subscribed to the Google
So this:
var form = new Element('form', {id:'MSO_LOGON', action:'#', method:'post',
style:'display:none'});
Renders this:
FORM id=MSO_LOGON style=DISPLAY: none action=# method=post
_prototypeUID=12 undefined=display:none/FORM
Notice the undefined above.
--
You received this message because
I find with IE of any flavor, that it helps a lot to break this up
into separate steps, rather than the lovely one-liner you have here.
var f = new Element('form'); // IE may be having kittens with form as
a variable name
//maybe insert it somewhere in the page, too, before you start working
Yeah, I'm recoding a bunch of these right now. Bummer. Seems like this
could be fixed.
Karl..
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To view this discussion on the web visit