« first day (18 days earlier)      last day (4937 days later) » 

12:08 AM
upgrades happening
 
@NickCraver Any idea what's new?
 
back-end changes afaik, prepping for UI upgrades
 
cool
 
keep an eye on blog.jsfiddle.net
 
will do
 
12:20 AM
also, very clean look using no images: jsfiddle.net/nJUgz/3
 
@NickCraver Nice, your handiwork? Doesn't IE9 support border-radius yet?
 
nah caught it on twitter earlier, love the cleanness tho
 
yeah, it's nice.
 
Pricing table I created today using CSS (no images) - http://jsfiddle.net/nJUgz/3/
 
love the fiddle code - nJUgz
 
12:29 AM
haha
 
I wonder if SO could be coded in such a way that it automatically tries to answer questions that contain syntactically challenged code.
For instance,
4
Q: getting javascript to display div based on text field

Kevin ZHey All, I have been working on this javascript file so that as someone types in more text, they will see a different div showing them a piece of code (soon to be a paypal button). For some reason, I cannot get the divs to show up. I have used both onchange and onkeyup and neither seem to be ...

spot the [javascript] tag, run the code through jslint and feed the errors back to the OP before he posts his q
I guess that would defeat the point of a Q&A site though
 
so many languages out there too, that have no tools
 
yeah. It would just save a bit of time.
I guess, at the end of the day, my solution might be more helpful than the pointed out elseif error, and you wouldn't get that if your problem was solved by a syntax checker.
 
i guess i could see some value there, but the vast majority of questions are misunderstanding of concepts, at least it seems that way to me
 
yeah, you're right
 
 
9 hours later…
Hi there o/
 
Tek
hi
good morning
Andy, you're awake at this hour?
 
@Tek It's 9.40am in the UK right now
 
Tek
Erm, then again that's assuming you live somewhere in the Americas. :P
 
9:41 AM
woo
New promising Javascript blog — http://whattheheadsaid.com/ (JS, ES, DOM, jQuery, ...)
 
Tek
:P. I see that now. I'm not used to talking to other people that differ from my time zone so vastly.
 
@Tek: you're awake at this hour? :p
 
Tek
Hah! I live in Europe time zone even though I live in the Americas.
:p
 
lol
 
Tek
Since I work from home, I wake up around 2AM every day. It's like staying up without the tiredness.
 
9:44 AM
@AndyE what are the numbers?
 
@Raynos attr() is 97% slower on Firefox 3.6 for me
 
Waking up @ 2AM o_o Is it humanly possible ?
 
Tek
I go to sleep around 5PM. So yes.
 
@Raynos: I get 98% slower for attr in Chrome, 92% slower for attr in IE9
 
Going to sleep @ 5PM is even less possible IMHO.
 
Tek
9:46 AM
Haha. Well, here I am!
 
It started with my rant about answerers repeating $(this).attr("id") several times in the same block
 
@AndyE But, of course, that also includes the amount of time needed to create the jQuery object
 
@Tek It means you're not human... you must be a robot.
 
what should attr be used for then?
 
@Raynos Oh, you can still use it, don't worry. Just don't use it when you can use the DOM attribute just as easily
 
9:47 AM
@YiJiang yeah, that's right.
 
@AndyE Suggestion: Get a favicon for your blog :D
 
@YiJiang: yeah, I was thinking that the other day. In fact, I was gonna use this from here:
 
Tek
@Chouchenos Well... considering I passed the CAPTCHA's from Stack Overflow... I'll just leave that thought there.
 
@AndyE Not really nice with your blog's layout...
 
@Chouchenos: I'm no designer :-P
 
9:50 AM
@Chouchenos Favicon != icon
 
@Tek A lucky robot then ? :D
 
Tek
@AndyE I don't know, I like your blog and it looks awesome to me! Definitely going on my favorites. For the content, for the most part of course. :P
 
@YiJiang But still, favicon is part of your global layout to me.
 
Tek
@Chouchenos I'm going to start playing the lottery if I can pass that man CAPTCHAS :D
 
@AndyE I was.
 
9:51 AM
@Tek: heh, thanks :-) It's just a standard template anyway.
 
Tek
@AndyE Standard awesomeness I'd say.
 
@Tek Give me the loto number for tomorrow !!!
 
Tek
@Chouchenos Fine. But I can't give it here out in the public. What are you crazy? :p
@AndyE I just noticed your website ISN'T "That's what the head said". >_>
 
@Tek True, true...
 
Tek
@AndyE originally I thought "That's what he said" before that one.
 
9:54 AM
@Tek I think the domain name is long enough :-)
 
Tek
Indeed. lol.
 
I think someone suggested "right said head" at first lol
 
@AndyE Oh wow... that's an extraordinarily long list of stuff .attr() do. What's that selected bug in Safari by the way?
 
@AndyE yerk.
 
in .css is the correct syntax table.x.y or table .x .y or table.x .y ?
 
9:57 AM
@Raynos Erm... isn't it .css(property, value) or .css(obj) containing property-value pairs?
 
Tek
@Raynos Wrong chatroom. Go somewhere else. :P
 
@Tek css room is dead. This is the only front end room
 
Tek
Lol don't take it seriously, just pulling your leg. :p
 
I meant in css files. what's the correct syntax for multipleclasses
 
10:00 AM
@Raynos Depending on what you want. The first gives you all table element with both class x and y
The second will get you elements with class y in elements with class x in all table elements
 
@Raynos: a space signifies a descendant selector.
 
Tek
^that
 
And the third gets you all elements with class y in tables with class x
 
Tek
Are you talking about class="class1 class2 class3" ?
 
A bit sad that the CSS room is dead, but that's inevitable anyway. Don't really want to turn this into (Front-end) Web Development room though, things might get too messy
 
Tek
10:04 AM
hehe
Considering how much CSS is a pain sometimes even when you know what you're doing, I can see why that room is empty.
:p
 
Thanks guys
 
I could always move the conversation to the CSS room after you're finished
 
I was talking about class="x y" and selector is element.x.y
 
@Raynos: yeah, that's correct :-)
 
@Tek It's not that bad, as long as you're not developing for > IE8 and knows exactly what you're doing
 
10:07 AM
0
Q: jQuery: function won't be executed until ajax call is complete

columbiaThere's a TinyMCE textarea on my website. When i click the "Save" button, the function save(); is called. It should lock the TinyMCE Editor while saving (assume save.php takes a few seconds to load). Even though formProgress(1) is the first line of code in my save() function, it won't be executed...

 
In terms of good practice are popups evil and how should they be replaced?
 
methinks async: false is not well understood :'(
 
@Raynos Modal or not modal? What type specifically?
 
Tek
Funny you say that. I haven't ran into any compatibility issues with CSS. It works seamlessly across all browsers. Does that mean I'm writing it properly? Sometimes I wonder what other people are complaining about with all the hacks for > IE8
 
@YiJiang using window.open
 
Tek
10:08 AM
I'm not going to lie. The only one I've ran into is IE5.5 not centering the page with margin: auto;
 
@Raynos window.open is blocked on Firefox if I can remember it correctly
 
@Tek punch.
 
Tek
But I don't mind it looking like that. Anyone running IE5.5 probably has a low resolution and the page should take up most of the page in which case no need for centering.
 
@Tek - IE8 has many issues (though admittedly less than 6, and 7), but you can't use advanced styling and be consistent, so you have to have a style that looks great for other browsers then make sure there aren't any issues in IE after
 
@NickCraver has it ever been?
 
10:09 AM
@YiJiang as a developer what should you use instead of window.open ?
 
@Tek If it ain't broken in IE6, you're doing something wrong :P
 
Tek
HAH!
 
I wonder if IE9 will support WebWorkers
 
Tek
I'm glad two wrongs make a right. =)
 
@Raynos Well, whatcha trying to do?
 
10:10 AM
@Tek You're talking about people using IE5 right? I think you mistyped "needs to be taken out back and shot"
 
Tek
lol.
 
@AndyE no, no it hasn't :'(
 
@YiJiang on button click pop up an edit window for something selected on the page
@NickCraver people who use IE5 needs to be shot in the room. right now they dont deserve a proper gangster style death
 
IMO, async: false is the evil half of a set of twins and needs to remain locked in the cellar and fed only raw fish
 
@Raynos You can try using a modal dialog box instead
 
10:11 AM
I can't think of a valid reason to ever use it
 
Tek
lol! @Raynos
 
@AndyE what's wrong with async: false if you want to load and run javascript files in order
 
very true
@Raynos then add them in order, done
they already execute in order if you add the <script> elements that way
 
^what I was gonna say
 
@NickCraver what if I want to feature sniff every page in the website and load them dynamically
 
Tek
10:12 AM
Speaking of IE5. It reminds me of this: clientsfromhell.net/post/1440829453/…
 
also, setTimeout("something", delay) makes babies cry, don't use it, k?
2
 
@Raynos: you can still load them async and execute them in a specific order, it just makes the code a little more complex.
 
@Raynos Are there really still ppl using IE5 ? I thought the worse still remaining was IE6
 
@Raynos - same applies, just add the <script> as needed
 
@NickCraver I think its valid to use setTimeout if your paranoid about event system in browsers
 
Tek
10:13 AM
@Chouchenos If you only knew.
 
@Raynos he's talking specifically about passing a string as the first argument
 
no no no no no, passing a string to setTimeout() and setInterval() is never valid
 
@Tek Teach me.
 
setTimeout("something", delay) vs setTimeout(function () { something }, delay)
 
exhibit A from this morning:
0
A: jQuery: function won't be executed until ajax call is complete

ChinmayeeTry this function call asynchronously by using settimeout e.g. function save() { setTimeout("formProgress(1)",1000); // AJAX call }

BAD DOG, BAD!
 
10:15 AM
Still whats wrong with using synchronious loading?
 
it locks up the browser, like completely
 
Tek
@Chouchenos I just link an example above.
 
including the UI thread
 
@NickCraver but its on page load. Anytime after is bad. But whilst loading the page losing another 50ms is no biggie.
 
what is?
 
10:16 AM
@Raynos It also blocks page rendering
 
when a page is loadng I can still type, scroll, etc
@YiJiang correct!
 
I guess I need to nest callbacks right?
 
@Raynos: synchronous script downloading doesn't block the UI thread. Synchronous XMLHttpRequests do (because the UI thread has to wait for the JavaScript execution to complete)
 
nah just use the callbacks at all, to run when it completes
 
@AndyE Just ran your blog through the HTML validator, came back with 77 errors, though all of them seems to be caused by a malformed ul (can't find it in the source though)
 
10:18 AM
@YiJiang: thanks, I'll look into it (could be the code formatter)
 
oo also some js errors ;)
 
@NickCraver Those seems to be permission errors caused by the embedded jsfiddle (in Firefox)
 
That'll be the stupid iframe plugin
Looks like I might have to roll my own
I love the spam you get on WordPress
> After much thought I believe your title “utilizing the awesome power of jquery to access properties of an element …” and many unique things make me to pass a lot of time on your website.
hilarious
 
@AndyE I'm also curious why you didn't use a client-side code formatter
The HTML produced is erm... less than awesome
&nbsp; &nbsp; &nbsp; &nbsp; runMyOtherFunction<span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">val</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
 
@YiJiang: know any good client-side formatters?
 
10:23 AM
Weird... four spaces didn't trigger code block
 
You have to admit though, WordPress does have an impressive httprequest count usually
 
It was just easier to use a GeSHi plugin
 
@YiJiang what about non modal pop ups how should I replace those?
 
ahhhh holy crap
no wonder that alarm never went off yesterday, i set it for AM
 
@YiJiang Could be starred.
 
10:27 AM
@NickCraver: ahaha I've done that so many times it's unreal. You'd think I would have learned by now.
 
hehe me too, it was my alarm to stop debugging and change the water to thaw chicken for dinner
 
24h clocks FTW :)
 
@Benjol +1
 
time is one of those incredibly annoying things in programming, ask skeet :)
 
lol
 
10:30 AM
I think, don't quote me here, it was argentina last time? Like 2 weeks before DST kicks in they go "oh yeah, we've decided not to observe daylight savings time anymore"
ffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuuuuuu
 
Really?
 
Tek
@Benjol Eww. :p
 
I mean really?
 
lol
 
that affects to many systems it's ridiculous, we have an alarm clock I have to manually set 4 times a year, because it still changes when DST used to be
 
10:31 AM
@NickCraver What's Daylight Savings? :P (Coming from someone living on the equator)
 
I don't really fault the embedded chip makers of that thing for going "what are they gonna do....change it?"
 
@NickCraver: I have a DAB alarm clock that doesn't update for DST, but I just unplug it and plug it back in and it sets the time via the DAB broadcast lol
I love DST in the winter, but I hate it in the summer ;-)
 
same here except it's PBS I think that carries the time signal here....BUT it either doesn't carry or my clock doesn't care about DST, so it goes by the date to determine it
and aye, DST winter = awesome, you can get at least 25 rep in that extra hour!
 
lol
 
however, be aware that the SO day moves an hour as well ;)
 
10:35 AM
@NickCraver Yeah, I realized last night when your GM script reset my counter to 0 just after midnight. And I was 25 points away from 200 thinking that I had an extra hour lol
 
Is there an alternative to window.open for non modal windows?
 
@Raynos - clarify "non-modal"?
 
@Raynos: not really... IE has, uh... showModelessDialog(). The alternative is to stick the content in a lightbox
 
What are dialogs exactly? just a text with yes / no ?
 
@Raynos: not in this scenario. It's a popup window that contains a separate document
 
10:39 AM
@NickCraver non-modal as in allow the user to interact with the current page
 
modal dialogs halt the JS thread and wait for a return value, modeless are async
 
10:50 AM
Man, it really irks me when people shorten "something" to "sth".
4
 
@AndyE +leventy billion
 
in C#, Oct 27 at 12:35, by Benjol
PUBLIC SERVICE ANNOUNCEMENT: Vowels now available in chat at no extra cost!
 
lol
 
@AndyE yo, kool dawg, u herd of dis txtspk ting we kool kids have thse days?
 
I dOnT rEaLlY sEe AnY pRoBlEm WiTh HoW kIdS tYpE tHeSe DaYs
 
10:54 AM
I don't mind so much when just the vowels are taken away (although it's still annoying), but when you take away consonants it makes me mad. Hulk smash, hulk bash!
@NickCraver: I once wrote an IRC script that automatically capitalized every other letter, just to annoy my college friends
 
Tek
lmfao @NickCraver
 
it's sad that it's needed :)
 
Tek
Gah
I clicked on that Public service announcement link and I got lost :(
LMFAO I love that quote
gets me every time =)
 
haha
 
Hmmm... weird... I think @Benjol just found a hidden (debugging?) feature. Type //test, and certain (random?) messages gets highlighted with an ugly red background
 
11:00 AM
yeah there are quite a few commands
 
@NickCraver Cool.. goes digging
 
//cash, //bc, etc
 
Tek
you should try //wassocash
 
it needs a command after
 
that killed me ;(
//bc
 
11:03 AM
actually looking for "//bc "...something
 
weird
 
/test
oh -.-
 
it's for sending poll commands to the server
 
//kick @NickCraver :-p
2
damn
 
        if (c == "//test") runTests();
        else if (c == "//cash") findCacheLeaks();
        else if (c.indexOf("//bc ") == 0) ha.broadcast(c.substring(5));
        else {
no kick command 4 u!
 
11:05 AM
perhaps //bc kick NickCraver :-P
 
//cash didn't play nicely with my browser :(
 
do eet
i gotta go for a bit, do your best to kick :)
 
function initSearchBox() {
    var a = $("#searchbox");
    a.focus(function () {$(this).val() == "search" && $(this).val("");a.removeClass("watermark");});
    a.blur(function () {if ($(this).val() == "") {$(this).val("search");a.addClass("watermark");}});
    a.blur();
}
 
cya :-)
 
@AndyE Time to get angry ;) That's the function used for the search box
 
11:06 AM
//cash checks if there are any entries in $.cache that don't below to elements on the page...was a source of a memory leak balpha and I tracked down in beta
 
function initSearchBox() {
    var a = $("#searchbox");
    a.focus(function () {this.value == "search" && this.value = "";a.removeClass("watermark");});
    a.blur(function () {if (this.value == "") {this.value = "search";a.addClass("watermark");}});
    a.blur();
}
completely unnecessary use of $(this).
 
@AndyE Go tell @MarcGravell and @balpha about it ;)
 
@YiJiang: I'm not sure either of them would care :-P
 
They're also using localStorage.getItem. That's interesting because a) They're using localStorage for something and b) I thought localStorage[i] is equal to localStorage.getItem(i)
 
val() in jQuery is only useful for chaining and <select> elements.
 
11:15 AM
@AndyE You'd prefer $('#someelement')[0].value to $('#someelement').val()?
 
@YiJiang: maybe they use localStorage for channel lists or something - probably pre-ajax loading.
@lonesomeday: yes... yes I would
 
@AndyE Also, is getItem the same as using [] for localStorage?
 
@AndyE Fair enough -- I'm sure it has better performance. Please don't kill me if I use it, though!
 
@lonesomeday: not using it is a micro-optimization, don't worry :-)
@YiJiang I'm not familiar with the API, but it's common among DOM collections to have both array-style indexes and a getter method.
@lonesomeday $(this).val() bugs me because it's unnecessary on input elements and only potentially necessary on select elements.
Like I said, it is useful for chaining, however.
 
jQuery event namespacing is done as namespace.click or click.namespace?
 
11:23 AM
@Raynos click.namespace
 
@AndyE thank you
 
np
 
can anyone explain how event bubbling works?
I bind an eventhandler to a table. and click on a td cell. This triggers the event handler to be called with the TD as argument. How and when does it bubble upto the tr ?
 
@Raynos: After the event fires on the TD element, it fires on the parent node, then on the parent node's parent node, then the paren't node's parent node's parent node, and so forth until there are no more parent nodes left
 
@AndyE does it do this automatically ?
 
11:37 AM
@Raynos: bubbling events do
 
which events are bubbling?
 
most of them. A few that don't are (off the top of my head) onchange, onfocus, onblur
onmouseenter, onmouseleave
 
can I make events bubble ?
 
@Raynos: yeah, you could write a function to trigger a specific event on each ancestor. jQuery supports bubbling for custom events.
 
How come none of my code trips up due to me being unaware events bubble and the eventhandler gets called on a lot of elements?
 
Tek
11:41 AM
@NickCraver You were right. I just stumbled upon a javascript question about creating a div and the solution had attr as part of the solution. Attr seems to be the most popular answer.
 
@Tek Post and shame ;)
 
Tek
0
Q: Javascript creating <div> on the fly

sico87Hello, I have a a link that looks similar to this <a href="/home/category/blog/1" id="blog">Blog</a> As you can the link has an ID of 'blog' what I want to do is to create an div on the fly with the ID from the link that was clicked so if the 'blog' is clicked, then the markup wo...

for like almost all the answers
only one contained this.id
 
@Tek Oh, old question. Hmmm.... feel like going in and editing
 
Tek
Whatever helps people in the future! =)
Old doesn't mean it isn't going to be stumbled upon.
 
@Tek The original posters may still be active - posting a comment would usually be more helpful in those cases, as well as to avoid people thinking that you were arbitrary editing their posts
 
Tek
11:47 AM
Which is why I said, whatever helps. Whether a comment or an edit. I can't edit yet I don't think so that's your call. :p
 
Tek
11:58 AM
@NickCraver Hey, thanks for helping with the code from several hours ago. I'm saying thanks again because someone else tried said I couldn't do an asynchronous request with an <input type="submit>. I disagreed and told him it was possible and told me to share the code. He probably learned something new thanks to you. =)
 
no problem!....what was the question? they all blur together these days :)
 
@lonesomeday: nice answer
4
A: Jquery's fadein 'slow' is too fast

lonesomedayYou have two options. The first is to use a number of milliseconds in the call: $('#myItem').fadeOut(1500); // 1.5 seconds The second option is to define a custom speed, or to redefine a jQuery native speed: $.fx.speeds.slow = 1500; // 'slow' now means 1.5 seconds $.fx.speeds.xslow = 3000; /...

 

« first day (18 days earlier)      last day (4937 days later) »