Omgili - forum search, search forums  
  

Discussions about dom classes

Displaying 1 - 10 out of 5,798 discussions.  
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
I use MooTools, and I need to find the element which has both classes "a" and "b" (the innermost div in my example below). The HTML structure is: <div class="a"> <div class="otherclass"> <div class="b"></div> </div> </...
Started by on , 3 posts by 3 people.  
What about $$('div.a div.b') or $$("div.a").getElements("div.b"); var divsB = $$("div.a div.b"); http://mootools.net/shell/jfnWK/ - selects the first one but not the second as it's not a child of a div.a .
I want to write some javascript classes which extend DOM nodes (so that I can then insert instances of my class directly into the DOM), but am having difficulty finding out which class/prototype I should inherit from. eg function myExtendedElement() {...
Started by on , 4 posts by 4 people.  
The....
At least, it enables me to access the extended object properties via the DOM element from DOM element, you need to have access to that element's prototype.
You can simply add new functions to the DOM prototypes, eg that works...
In Javascript, you can extend existing classes by using its prototype object: String.prototype.getFirstLetter = function() { return this[0]; }; Is it possible to use this method to extend DOM elements?
Started by on , 6 posts by 6 people.  
Plus re-extending every new.
However, this does (by "anything" I mean native DOM objects) - that will only lead to bad things.
() { return this.id; }; you can extend the DOM by using the Element's prototype.
Ask your Facebook Friends
In javascript, what are the pro's and con's of encoding an onclick event in the DOM and in the HTML itself? Which, if either, is better than the other and why?
Started by on , 4 posts by 4 people.  
It is even better to use proper DOM events ( addEventListener and attachEvent ) rather than.
Attaching events to an CSS-style ID (or classes), as Jquery does so says.
Everything down all at once.
Can I test my client side GWT code without GWTTestCase? I've heard somewhere (I think it was one of the Google IO 2009 conferences) that they were successfully testing their code with a fake DOM, in the JVM and not in Javascript with the DOM. That would...
Started by on , 3 posts by 3 people.  
By doing this, you, without the need for a browser... .
Any code that requires the DOM should go in your View classes/Presenter pattern and abstract away all the DOM-accessing code to the 'View' portion.
The Model-View-Presenter pattern.
When using $("#xxx") I guess under the hoods jQuery uses getElementById . What about $(".xxx") does it scan the whole DOM every time?
Started by on , 6 posts by 6 people.  
JQuery attempts to use the fastest selection://www.componenthouse.com/article-19 http:....
Many browsers do not support getElementsByClassName as a native DOM function, so jQuery has to do the work itself by checking each element's classes.
I'm trying to modify the class of an element if an ajax call based on that element is successful <script type='text/javascript'> $("#a.toggle").click(function(e){ $.ajax({ url: '/changeItem.php', dataType: 'json', type: 'POST', success: function...
Started by on , 3 posts by 3 people.  
Example: $("#a.toggle").click(function(e) { var target = $(this); $.ajax({ url: '/changeItem.php', dataType: 'json', type: 'POST', success: function(data,text) { if(data.error=='') { if(target.hasClass('class1')) {... .
You can just store it in a variable.
Hey all, I was just wondering if there is a clean implementation to getting elements before appending them to the DOM. Example (w/ jQuery): var html = "<div class = 'test'><div class = 'innertest'>Hello!</div></div>"; var innerDiv...
Started by on , 8 posts by 8 people.  
Do any sort of editing....
I would like.
Looked at DOM DocumentFragments ? As far As i understood you want to edit a certain piece of DOM to your satisfaction before you display it , like you Manipulate a DOM thats currently in Display.
I am a pretty good programmer(IMO only, of course. Know Python, Java well. Tried my hands at Lisp, Ruby, Haskell). I also know how to use Jquery reasonable well, so I know Dom manipulation. I want a recommendation on a Javascript book, which teaches the...
Started by on , 4 posts by 4 people.  
Some of the examples do involve the DOM, but they really give a feel for the flexibility of the core.
By showing a number of approaches for simulating classes, classical inheritance, private members, etc.
Is it possible to have some sort of Id scoping when manipulating DOM with JS? I use jQuery as my JS framework. For example: Is there any mechanism that would allow to select someDiv children of first or someDiv children of second, or do all ids on the...
Started by on , 4 posts by 4 people.  
The id attribute can be used by a JavaScript (via the HTML DOM) or by CSS to make changes or style.
Page: 1   2   3   4   5   6   7   8   9   10  
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost