Hi everybody!
I'm actually working on a script acting on a UL menu with different LI
classname. The goal is to react onMouseOver and onClick on each LI
click or mouseover differently. The fact is the class is unknown so my
script have to check the UL and then observe each LI as elements.
Here is
What is wrong with the following, the bad result is the new input
elements are not contained by the new div element:
Javascript:
var div1 = div.insert(new Element('div', { 'class': 'new-section' }));
div1.insert(new Element('input', { 'name': 'newsection-name-' + count,
'class': 'newsection-name
Hi jinsa, i'm not a professional but for what i've been reading yesterday i
can say you where is the problem.
I mean where to begin.
The approach can be pretty different if you are using a framework (Mootools
scriptaculous jQuery) or you are writing javascript by yourself (which i
think in order
Just as a small nit-pick, LI elements are containers, and so should
have closing /li tags.
-joe t.
On Feb 20, 8:58 am, Jinsa jf.wesq...@gmail.com wrote:
Hi everybody!
I'm actually working on a script acting on a UL menu with different LI
classname. The goal is to react onMouseOver and
Hi,
Element#insert returns a reference to the same element you called it
on, not the new content. Just change your first line to
var div1 = new Element('div', { 'class': 'new-section' });
div.insert(div1);
...and the rest should work.
HTH,
--
T.J. Crowder
Independent Software
Hi Jinsa,
Your `bindage` method nearly works, you just have to change `$
('menu').down('li').each` to `$('menu').select('li').each`.
Element#down (with no index argument) finds the first matching
descendant element and returns it; Element#select finds all matching
descendant elements and returns
Hi Joe,
Just as a small nit-pick, LI elements are containers, and so should
have closing /li tags.
Browser behavior for years has made doing what he did functional, and
the HTML5 spec will actually formalize it:
http://dev.w3.org/html5/spec/syntax.html#optional-tags
I only realized that the
Hi Dan,
NOW, every-time I do a AJAX.UPDATER...it doesn't do what it's suppose
to. IN OTHER WORDS: It's acting like those declarations are not declared
in the header.
It's actually doing what it's documented[1] to do: script blocks
referencing external files will be treated as though they were
There isn't PeriodicalExecuter#start method its
PeriodicalExecuter#registerCallback
You can do:
code
x.stop();
x.frequency = 1;
x.registerCallback();
/code
You can also do:
code
PeriodicalExecuter.addMethods({
changeFrequency: function(frequency){
this.stop();
this.frequency = 1;
You can also use Event.delegate / http://gist.github.com/66568 / And
make it event simpler
$('menu').deleage('li', 'click', function(event){
event.stop();
alert('hellow bro');
}
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
10 matches
Mail list logo