« first day (836 days earlier)      last day (4095 days later) » 

m59
11:10 PM
Now that I've done this and failed, I understand why you can't append an element twice...
but that sucks lol
 
11:26 PM
!!/mdn Node.cloneNode
 
AW YEA!
Love the combination.
 
@m59 that was for you
 
m59
I know. It's not the problem of cloning, it's just that i didn't want to have to check a fragment for children (which isnt possible), so use an array to track what I have already added to the fragment.
 
what are you trying to do? can you show me ?
 
m59
11:39 PM
@rlemon sure, just a moment
@rlemon kinda long jsfiddle.net/wunhQ
for some reason the clone isn't working either. The if's are working right, it just won't append it.
 
return_listsDescsMarkup
who taught you naming conventions?!
you are worse than me?!
 
m59
lol
 
thats hard to do!
 
m59
do you have a more clear name? lol
It was originally just called listsDescs and that was way too vague for me to remember what it did
 
no underscore AND camelCase in a function name
 
m59
11:51 PM
^^ too vague
 
getListDescsMarkup
still ugly but better
 
m59
I'll consider it
 
all functions return whether you like it or not. some just return nothing :P
 
m59
lol
 
saying it's a "return" is redundant
 
m59
11:52 PM
my other ones say append_thisAndThat
lol
 
thats why I like "get" and "do"
 
m59
and load_thisCSS
get Sounds good
 
function getMarkup() {
  return yadda;
}
function doLoadCSS() {
  blah blah load the shit.
}
you are calling the function to get something
or you are calling the function to do something
semantic.
but that is if you need a qualifier in the name to remember the functions purpose
 
m59
LOLLLLLL
I'm an idiot of epic proportions
helps to not comment out the appendChild line
-FACEPALM-
hmm, cloned items lost their click functions
 
how did you register it
> Cloning a node copies all of its attributes and their values, including intrinsic (in–line) listeners. It does not copy event listeners added using addEventListener() or those assigned to element properties (e.g. node.onclick = fn).
attach em again.
element.setAttribute("onClick", "foo()"); // :P why not right?
should be copied. :P hehehe
 

« first day (836 days earlier)      last day (4095 days later) »