Profile

Achievement

first submission:submitting first snipplet popular snippet:having a snipplet with 20 favorites

1man's Recent SnippetsTagged DOM



« Prev 1 Next »
Great little snippit to add a <tr> to the bottom of a table. Note the use of the context in the jQuery e.g var n = $('tr:last td', this).length; Will have to use this in the future, very good to know!
4 1706 posted 15 years ago by 1man
Simply replaces the div's innerHTML with the response text received from the file.
3 1533 posted 17 years ago by 1man
This while loop will remove all childNodes from a selected element.
1 653 posted 17 years ago by 1man
This function allows you to open a new window, without using any inline Javascript. Simply add rel="external" to the link you wish to open in a new window.
3 1172 posted 17 years ago by 1man
Use this function to queue functions you wish to load on window onload. Very useful when code becomes complex.
3 1142 posted 17 years ago by 1man
Usage of the getNextElement function. Very basic usage to pick out the h1 tags, then change the properties of the next element(not node).
1 868 posted 17 years ago by 1man
Useful function for CSS DOM, returns the next element after the selected node. So you could style the element directly after a h1 element for example.
2 762 posted 17 years ago by 1man
The very basic markup for the enhancement DOM script from a tutorial.
0 627 posted 17 years ago by 1man
This is another script from the DOM scripting book. Not really relevant to anybody else. Useful for reminding myself about the DOM.
1 806 posted 17 years ago by 1man
Not really relevant to anybody else. Full unobtrusive js file for a simple gallery. From DOM Scripting by Jeremy Keith (superb book, highly recommend it for anyone looking to move into DOM scripting)
2 727 posted 17 years ago by 1man
Vert useful function since there isn't an insertAfter function in the DOM. Call it inside scripts, it expects insertAfter(*the new element to be inserted*, *the element you want it to be inserted after*);
3 2058 posted 17 years ago by 1man
« Prev 1 Next »