[thelist] Click once, Act Twice - (now confused) - SALIM
S.F. Alim
salim at vodatel.com
Tue Mar 21 02:03:14 CST 2006
i try my best but now i give up, so finaly im asking again,
>>So if your link would be <a id="foo" ...
yes now i have my link with id, ie <li><a id="storeClick" ...
and change my `init` function also
[before]
init: function() {
if(!document.getElementById) return
var sC = document.getElementById('storeClick');
cE.addEvent(sC, 'click', oS.hidding, false);
},
[/before]
[after]
var cE = {
addEvent: ...
cancelClick: ...
getTarget: ...
aListener: function(e) {
t=getTarget(e);
cancelClick(e);
}
};
var oS = {
init: function() {
if(!document.getElementById) return
var sC = document.getElementById('storeClick');
cE.addEvent(sC, 'click', cE.aListener);
sC.onclick=function() {return false;} // for Safari
},
hidding: ...
};
[/after]
realy im confused at as you mention in your last reply...
~~~~~~~~~~~~~~~~~~~~~
>>fooListener:function(e){
>> t=getTarget(e); // get the link
>> cancelClick(e);
>>}
~~~~~~~~~~~~~~~~~~~~~
could you explain little bit more on it. cuz im learning Javascript/DOM and
at the same time i want my code to be `unobtrusive` coding.
thanks in advance.
~~
S.F.Alim
More information about the thelist
mailing list