-
16 Oct 2008 12:02 AM #1
target = e.getTarget('a:not(.exi)', 3), what does it mean?
target = e.getTarget('a:not(.exi)', 3), what does it mean?
target = e.getTarget('a:not(.exi)', 3)
what does it mean?
the following code come from EXT EXAMPLE
onClick: function(e, target){alert(target);
if(target = e.getTarget('a:not(.exi)', 3)){
var cls = Ext.fly(target).getAttributeNS('ext', 'cls');
e.stopEvent();
if(cls){
var member = Ext.fly(target).getAttributeNS('ext', 'member');
this.loadClass(target.href, cls, member);
}else if(target.className == 'inner-link'){
this.getActiveTab().scrollToSection(target.href.split('#')[1]);
}else{
window.open(target.href);
}
}else if(target = e.getTarget('.micon', 2)){
e.stopEvent();
var tr = Ext.fly(target.parentNode);
if(tr.hasClass('expandable')){
tr.toggleClass('expanded');
}
}
},
-
16 Oct 2008 12:11 AM #2
It's a css selector, which looks for:
Anchor tags, that don't have the class name "exi", to a height of 3 above the current element.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
16 Oct 2008 1:24 AM #3
to a height of 3 above the current element.
what does it mean?
<a ext:cls="Ext.util.JSON" ext:member="encode" href="output/Ext.util.JSON.html#encode">Ext.util.JSON.encode</a>
onClick: function(e, target){alert(target);
if(target = e.getTarget('a:not(.exi)', 3)){...
when you click the link,the alert window show 'http://localhost/ext/docs/output/Ext.util.JSON.html#encode'
why e.getTarget('a:not(.exi)', 3) ='http://localhost/ext/docs/output/Ext.util.JSON.html#encode'
-
16 Oct 2008 1:51 AM #4
You could always just get this info from the docs: http://extjs.com/deploy/dev/docs/?cl...mber=getTarget
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
14 Jan 2009 6:14 AM #5
-
14 Jan 2009 6:24 AM #6
DomeQuery API docs say "DomQuery supports most of the CSS3 selectors spec, along with some custom selectors and basic XPath."
And http://extjs.com/deploy/dev/docs/?cl...mber=getTarget actually tells you what the depth is.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
15 Nov 2012 11:39 AM #7
getTarget( event ) : HTMLElement - 4.1.3 doc doesn't tell you anything
getTarget( event ) : HTMLElement - 4.1.3 doc doesn't tell you anything
All it says is that selector is a string???
selector : String (optional)A simple selector to filter the target or look for an ancestor of the target
No info regarding format, links to resources or even mention of CSS3 or XPATH


Reply With Quote
