« first day (136 days earlier)      last day (4815 days later) » 

3:01 PM
well, true, but it's kinda ironic
 
Yes very much so, also I view people that use macs either as: Programmers who want good workflow or thickos who just want it cause "It's pretty and Steve says its good"
 
lol
 
Anyone want to join the Computing Hardware commit?
Overclocking and hardware discussion goodness
 
I like the area51 idea, but tend to only get into OC'ing when it's time to upgrade. Now that I have two kids, and no money, that's pretty much never! Heheh...
 
Go on commit to it at least :)
 
3:10 PM
@ircmaxell its just a misleading statistic mac lovers use to justify spending their savings on something they won't use to its potential
 
right
 
alright committed
 
(not the programmers who want good workflow)
@MylesGray can't commit
"an error has occured"
 
@Greg? Tried refreshing?
 
@MylesGray Commited
 
3:13 PM
@Greg I agree on the "buy me im invunerable" point
Awesome :D
thanks @SeanW and @Loktar
 
still can't commit
but I wish I could ... sounds a great website idea
 
Yeah it would be amazing
 
I'm hacking. What's the proper alternative to window.location.href = "http://www.google.com" ?
 
Not JS but... Does anyone got an ebook (sony or kindle)?
 
27 messages moved to Tech Rant
4 messages moved to Tech Rant
 
3:21 PM
I have a kindle
 
@Shikiryu I have a kindle too, very nice
maybe goto tech rant for this?
 
or @Raynos will have your head!
 
Just cleaning up
 
3:41 PM
ok i got a question
concerning window.resize ot jQuery(document).resize
sorry i mean jQuery(window).resize()
if i add different handlers at different locations, is there a way to say that a specific handler has to be called last. Or is it always 'multicast' ?
 
It would seem pretty odd and confusing to have multiple instances of resize. I would have a main one, and then have the order of functions you want called in it at least.
 
yes
but the problem is that there are multiple plugins in use
 
ah ok
 
some of those plugins have registered eventhandlers on resize
and i want my resize eventhandler to be executed after all those other ones
 
3:48 PM
for now i did jQuery(window).resize(function(){setTimeout(DoResize, 500)}); but that seems hella ugly
 
yeah
 
it works though
 
Hi! :)
@Roel wrap code in backticks: `code` or if you want to post multi-line code, press the fixed font button or Ctrl+K before sending the message
@Roel Here's another way, though you can't do this if you have more than one functions:
function bind(fn, scope, args) {
    return function() {
        return fn.call(scope, args);
    }
}
                     // function    scope     arguments
$(window).resize( bind(setTimeout, window, [DoResize, 500]) );
 
ok sorry .. backticks, will do
thanks for the info, will try that
 
4:04 PM
@Roel No, not in real code… only in chat, to format code!
 
@Roel you want event types..
$("resize.MyControl").bind(...)
$("resize.MyControl").trigger()
 
4:28 PM
Fun with jQuery Templating and AJAX http://bit.ly/efowAa by @danwellman
 
If you have a jquery object of length 1, do you always have to specify someObject[0] to access the Html node?
 
yes
 
hmmok
 
Markdown Editing Help Chat uses a limited subset. You can't use formatting in multi-line messages (except for making all fixed-width), headers and everything that would only be useful in multi-line messages. Images can't be inlined, you can only post them in separate messages, like this: !http://path/to/ima.ge For tags, you can use [tag:tagname] and [meta-tag:tagname].
@Raynos Could you pin that, please? It would be useful for new users.
 
ok this answer confuses the heck out of me
0
Q: jQuery cycle stop on start and than play

Deehi, there is a way to stop jQuery Cycle plugin on init and than start it from another function later in my code? $('#cycle').cycle({ fx: 'fade', // stop it }); // than play it

do you guys see where hes going with it??
I considered a -1.. but not sure
 
4:38 PM
So many people don't write jQuery correctly… JQuery, Jquery, jquery etc.
 
@Nyuszika7H You're right, it's really written as jSucks
:-P
 
LOL
I write it different every time @Nyuszika7H :P
 
@Loktar I always write jQuery. I even needed to press Backspace many times while writing that to be able to write it “the wrong way”. :P
 
lol
 
hey guys, is there a way to store 0 or "" to multiple variables in my js file without having to list them all out like so:
var1 = 0;
var2 = 0;
var3 = 0;
var4 = 0;
 
4:41 PM
var1 = var2 = var3 = var4 = 0 :p
 
var var1, var2, var3 = 0; ?
 
@Greg No, var1 to var2 will be undefined that way.
 
If you want to give your vars default values theres really no way around it but initializing them with that value
 
@sadmicrowave If you want to declare them in global scope, you could do something like this:
 
@Loktar, your initial response would work though
 
4:46 PM
function set_vars(value, vars, scope) {
    scope = scope || window;
    for (var i = 0; i < vars.length; i++) {
        scope[ vars[i] ] = value;
    }
}
It would even work in other scopes if you specify the scope.
 
yes that would work
 
// global scope
set_vars(0, ['var1', 'var2', 'var3', 'var4']);

// still global scope
set_vars(0, ['var1', 'var2', 'var3', 'var4'], window);

// local scope
set_vars(0, ['var1', 'var2', 'var3', 'var4', myObj);
 
no, nevermind
 
Another thing: I could do an isset function this way. Though it's useless, because I can do typeof myVar === 'undefined'.
function isset(_var, scope) {
    scope = scope || window;
    return (typeof scope[_var] !== 'undefined');
}
 
heh wow @Nyuszika7H thats a cool way
 
4:50 PM
if ( isset('test') ) {
    // test is set on window
} else {
    // it isn't set
}

if ( isset('property', obj) ) {
    // property is set on obj
} else {
    // it isn't set
}
Syntax: isset('variableName' [,scope]);
Another thing: [[Class]] is more realible than typeof.
function class(obj) {
    return Object.prototype.toString.call(obj).slice(8, -1);
}
> typeof ['foo', 'bar']
"object"
> class(['foo', 'bar'])
"Array"
> typeof /baz/
"object" ("function" in Nitro/V8)
> class(/baz/)
"RegExp"
 
That's not reliability, it depends upon what you're trying to do
 
Hmm, yeah, it's fine for checking if something is a function or a string.
Though in Nitro/V8, typeof something === 'function' would also catch regexes.
 
It just all seems overly complex to the alternative.. var i =0
 
it's fine for objects as well. Remember, array is an object in its implementation semantics. It has methods and a prototype chain
 
@ircmaxell Yes, but if you want to check if something is an array, using [[Class]] is the easiest way.
 
4:57 PM
Well... there's no instanceof operator?
 
@ircmaxell Yes there is one, but [[Class]] is the best.
 
what's wrong with instanceof?
 
new String('foo') instanceof String; // true
new String('foo') instanceof Object; // true

'foo' instanceof String; // false
'foo' instanceof Object; // false
This is not what we want. Or is this? Even typeof is more realible in this case.
 
and what does class('foo') return?
 
@ircmaxell 'String'
 
4:59 PM
fair enough
but I hate the term best. It implies cannot be improved upon...
 
An improvement to [[Class]], to don't catch undefined and null:
 
I never use the term best here, ever.. because people always have different/cool ways of doing things.
 
function class(obj) {
    return obj !== null && obj !== undefined && Object.prototype.toString.call(obj);
}
> class(undefined)
false
 
Hi All
 
@kamaci Hi!
 
5:06 PM
I have a question with jquery
I am handling a form submit with: $('#deleteRecordsForm').submit(function(e) {
and it works
 
@kamaci wrap code in backticks (hover over your message and click the arrow on its left to edit/remove)
 
ok
$('#deleteRecordsForm').submit(function(e) {
 
And the rest of the code?
 
 <div id="List">
   <jsp:include page="List.jsp" />
 </div>
sorry
<div id="List">
  <jsp:include page="List.jsp" />
</div>
<div id="List">
  <jsp:include page="List.jsp" />
  //form was here
</div>
 
post it as a question
stop that now… I told you that you can edit/delete messages
 
5:09 PM
ok
 
@Nyuszika7H: easy there killer...
 
is it possible to use moo.fx with jQuery?
 
@DontCare4Free moo.fx? what do you want to do?
 
@Nyuszika7H just wondering if it would be possible to use moo.fx together with jQuery without causing any conflicts
 
@DontCare4Free if it doesn't use $, yes
 
5:16 PM
@Nyuszika7H moo.fx depends on either mootools or prototype
prototype uses $, but I'm not sure about mootools
 
@DontCare4Free it uses $ too
jQuery.noConflict();
(function($j, $m) {
    // your code here
})(jQuery, $);
 
@Nyuszika7H so, I need to use jQuery compatibility mode then?
 
@DontCare4Free yep
 
MooTools has a noconflict setting as well
 
@ircmaxell it does?
 
5:18 PM
Yep, if you load MooTools later, I think you need to use its noConflict instead of jQuery's.
 
yeah, I see that
 
it automatically has no-conflict
 
if you load MooTools last
 
@Nyuszika7H 'foo' is a native. It's a literal. It's not an object so 'foo' instanceof String is correctly false
 
5:19 PM
No, if you load Moo second. It will see $ being defined, and not overwrite it
 
@ircmaxell yep, corrected
 
But the core doesn't use $ at all anyway
so if it's overwritten by jQ it doesn't really affect anything but your own code
 
@Raynos I know – this is why instanceof can't be realibly used for checking if something is a string.
 
if I use drupal and include mootools as a requested script from a module, will it include mootools or the bundled jQuery first?
 
@Nyuszika7H ... foo is a string it's not an object that's an instance of a String. Your using instanceof wrong. There's nothing wrong with instanceof
 
5:21 PM
BUT: why bother? Just use one framework. Don't load multiple
 
@ircmaxell yes, but for instance, some cms softwares bundles one and prevents you from removing that one
 
@Raynos I understood that, but it's still a string; so if you only want to accept strings in a function, this is why I shouldn't use instanceof for that. I didn't said there's anything wrong with it.
 
@DontCare4Free: that's fine, use that one
they are all about the same in their capabilities. If you can use one, the other isn't that different
 
@DontCare4Free you dont need more than one
 
ok, thanks for the help
 
5:24 PM
Just be free and go pureJS then you dont have to worry at all about these things :)
 
@Loktar but then a lot of boilerplate code would be needed
 
Yeah I was just joking. I understand theres alot of valid uses for frameworks. I use them all the time.
 
@DontCare4Free Why would you want to use Moo.Fx with jQuery? jQuery has powerful animation effects, too. If that's not enough, jQuery UI has even more. (No, it doesn't conflict with jQuery, it extends it.)
 
I know
it was a hypothetical question
 
I wish jxlib.org was more active
 
5:31 PM
@ircmaxell is that like jQuery ui for mootools?
 
it's a UI toolkit for moo
 
-5
Q: Should there be some type of chit-chat site on StackExchange?

DmitriHow about making something like chitchat.stackexchange.com where people would not have to necessarily ask questions but be more like a regular forum format to discuss things. There could still be up/down votes but does not have to be a "best answers" feature. Right now it's hard to start off-to...

 
the tree and grid are great
 
LOL
 
5:34 PM
Isnt that called reddit?
 
@DontCare4Free I know, chat.stackexchange.com
 
6:03 PM
How do you get Google Code to parse HTML files?
If you try to do that with mine, you get the code itself jpopit.googlecode.com/svn/trunk/index.html
 
Someone want a userscript challenge?
 
@Shaz maybe its a hardcode for readme files
 
@Shaz Have you tried setting the doctype to the one in the working example?
 
Hmm, I haven't tried either of those, so give me a bit to try it :P
 
6:33 PM
Didn't work. :/
 
@Shaz None of them?
 
@DontCare4Free Tried both, didn't seem to work
 
@Shaz okay
 
6:59 PM
5 messages moved to bin
2 messages moved to bin
Ideally this room should be split in two. A web dev common room and a JavaScript room.
 
@Raynos agreed, somewhat
 

Web Developers Lounge

A place to talk about HTML, CSS, JavaScript, or anything else ...
 
Noise isn't bad as long as it's not destructive
 
@ircmaxell and not absolutely pointless.
 
if someone's trying to get help, and they can't because of the noise, it's a problem. Otherwise it's fine...
 
7:04 PM
True. Off topic conversation is fine if it's not destructive.
It does have a habit of getting silly though
 
I won't deny that
 
7:15 PM
It's April Fools' Day! (No, it isn't.) markup.io/v/0tm4czz94h1s
 
It's April Fools' Fools' Day!
3
 
Ok, really, who put that code in the source?
document.body.innerHTML = document.body.innerHTML.replace(/\d+/g, NaN);
Oh, wait, there's a copyright notice, too.
 
Why not?
 
/* Copyright 2011 Ivo Flipse.
   MADE FOR APRIL FOOLS' DAY
   The code above shouldn't be removed until April 2nd, 2011 0:00 UTC.
*/
 
7:46 PM
anything interesting happened today?
 
not really that I know of
Today was the first day, right?
 
well, I was there for meeting and monthly planning
will start on monday
 
go well?
 
it was awesome
great team and atmosphere
 
Neo
hello
 
7:47 PM
Sweet!
 
two guys from US where there too, so a full office and around 6 hours of talking
 
nice
 
Neo
@ircmaxell have you ever worked with jqui datepicker? @IvoWetzel too
 
nope
 
Neo
could you still look at this, it will only take a second its 5 lines of javascript I always use and all of a sudden its not working Im almost thinking its my browser : marathongeeks.com/smarty.php
when you click on the first input it should popup a calendar do you see it?
 
8:00 PM
@Neo Nope
 
Neo
Im going crazy theres not anyhing there to be wrong I had the problem in a page with alot of stuff going on so I started to cut parts until it starts working and now there is nothing left to remove other than the same jquery library from google cdn I always use
 
user1385191
ugh I had to work with jQuery UI for a slider today. It was extremely painful.
 
Neo
@Matt can you take a look at this and see what you think might be the problem? marathongeeks.com/smarty.php
 
user1385191
why is your script in the head tag?
 
Neo
it was in the body before I just changed it
@Matt see now its not
 
user1385191
8:11 PM
are you calling the function where the datepicker is?
 
user1385191
well I guess that goes without saying seeing as the datepicker's in the DOM.
 
user1385191
two things:
 
@Neo Use this:
 
Neo
yeah, you can even see it in the generated code but its as if it doesnt have css but the reset button works
 
user1385191
1. this class needs to be removed somehow "ui-helper-hidden-accessible"
 
8:13 PM
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js" type="text/javascript"></script>

        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js" type="text/javascript"></script>
 
user1385191
2. the datepicker needs to be set to display: block
 
user1385191
then it shows up
 
Neo
f***ing google they are supposed to keep these things unchanged... Shaz's solution worked but these are the same js files I always use and they used to work with datepicker! @Shaz you are awesome!
 
user1385191
interesting
 
user1385191
it was noted in class today that people were having problems with a jQuery plugin
 
user1385191
8:16 PM
might have been because of the 1.5.1 update.
 
@Neo No problem. It's probably because of compatibility issues, for example an older version of jQueryUI can't work with a newer version of jQuery, or something like that.
 
Neo
@Shaz but I was using it with another website (the same combination) and I just took a look right now and that too is not working, maybe a google employee messed up the versions! :
 
Weird
@Neo They did keep them unchanged however. jQuery just has new versions coming out and Google also includes those (...and also keeps the older versions). Just need to stay up to date with them! ;)
 
Neo
yeah I know, but what I'm telling you is that I used the same versions, identical urls! of jquery and jqueryui in all my recent projects!
and last night was the firsst time I had this problem
maybe I'm mistaken but thank you so much anyways
 
If you always want to use up-to-date versions, you can do this:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
 
Neo
8:21 PM
oh cool! thats really good to know! I'll do that then and hope jquery team always has backward compatibility in mind
 
and for jquery ui:
http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js
 
user1385191
ha love the giant wall of text.
 
Hi there
 
1
A: Using Css to Clear TextBox Text/value

Myles GrayThis isn't possible with CSS, only with JS: Event handler function: addEvent(document.getElementById('IDHERE'), "focus", function() { clearText('IDHERE'); }); Event listener function: //addEvent listener function addEvent(obj, type, fn) { if (obj.addEventListener) { obj.addEventListe...

:D
 
If you're browser doesn't support ECMA5 yet, use: ddr-ecma5.googlecode.com/svn/trunk/main/js/ddr-ecma5.js
That's how Object.keys() is supported
Just realized that.
 
@Shaz you watching Crockfords Yahoo talks too?
 
@MylesGray Yup, finished them about an hour ago. xD
 
8:45 PM
I'm still on number 2
that first was must have been 3 hours
was a beast of a thing
 
user1385191
@MylesGray don't forget the clearText function
 
user1385191
they'll be lost without it
 
Oh yes
@MattMcDonald fixed :)
 
user1385191
there's your upvote
 
thank you sir :)
 
user1385191
8:49 PM
if I may, can anyone recommend a good SVN client on the Mac side? $55 for a Versions license is robbery.
 
use git :)
@IvoWetzel good to hear your first day is going well.
 
according to the apache subversion site, apple makes one
 
@MattMcDonald I have Versions, get Git
I use Tower for Git
VERY good
 
user1385191
I just tortoiseSVN at home and I'm just fine with it.
 
user1385191
8:52 PM
but I need one for work.
 
Do you HAVE to use SVN?
 
user1385191
my college only has tortoiseSVN, so I have to use SVN.
 
user1385191
they won't let me install software (IE: Flex)
 
@Shaz True but it is much better than Versions, Versions is incomprehensible
 
@MattMcDonald tried the svn command-line client?
 
8:53 PM
@MattMcDonald Well thats the best SVN-Wise that there is
 
@MattMcDonald That's what I use but I have Windows. I don't know if it supports Macs.
 
ubuntu@ubuntu:~$ alias can-has='sudo apt-get install'
ubuntu@ubuntu:~$ alias can-remove='sudo apt-get remove'
ubuntu@ubuntu:~$ alias can-find='sudo apt-cache search'
 
user1385191
hmmm I could install subclipse for mac
 
user1385191
since Flex is built on Eclipse.
 
@Nyuszika7H that code was written by John Resig... wanna mess with him ;)
 
8:59 PM
@MylesGray that event listener thingy?
 
I think this is the correct way: (don't care about changed variable names, it's not required to use these)
function addEvent(element, eventType, eventHandler) {
   if (window.addEventListener) {
       element.addEventListener(eventType, eventHandler, false);
   } else if (window.attachEvent) {
       element.attachEvent('on' + eventType, eventHandler);
   } else {
       element['on' + eventType] = eventHandler;
   }
}
Though this overrides previously set event handlers in really old browsers like NS4.
Here's a workaround that may work:
 
`Much of the above code is trying to fix a serious problem with Internet Explorer. The code has to be this troublesome due to the fact that when your attached function gets fired, the 'this' reference refers to the worthless 'window', when, in fact, it should refer to the parent object. An explanation of the key points:

obj['e'+type+fn] = fn;
This makes the function a child of the specified object. The key, which is placed in the object hash, is (hopefully) unique and won't collide with any other function additions.
 
@Raynos Was really great and I think I did participate quite well in the discussions
 
function setInlineEvent(element, eventType, eventHandler) {
    var handler = element['on' + eventType];
    if (!handler) {
        element['on' + eventType] = eventHandler;
    } else {
        element['on' + eventType] = Function( handler.toString() + '; ' + eventHandler.toString() );
    }
}
Though this is eval, I can't think of any other workarounds…
 
9:09 PM
set it to strtolower
and why not just do something like this:
 
Anybody know why the image gets smaller before it gets larger when you hover over it? jsfiddle.net/Shaz/wNUy9/2
 
function setInlineEvent(element, eventType, eventHandler) {
    var handler = element['on' + eventType];
    if (!handler) {
        element['on' + eventType] = eventHandler;
    } else {
        element['on' + eventType] = (function (h1, h2) { return function() { h1(); h2(); }; })(handler, eventHandler);
    }
}
 
@ircmaxell Oh yeah, I've used that earlier. Thanks. (Is that complicated return function thingy really needed?)
 
herrro
 
@Nyuszika7H whatever, semantics
 
Neo
9:13 PM
@Shaz I think that is part of the animation, its more meant to be used like fade in to bring something into the interface from a width and height of 0
 
@Shaz I think you should use jQuery.hoverIntent() instead of CSS :hover rules.
 
@Nyuszika7H: prob not, but it binds the scope, so there's no need to worry about leakage of the element variable...
 
@Nyuszika7H I didn't even know there was such a function, I'll look into it. Also, I think you're right Neo.
 
@Shaz No, it's a plugin.
 
user1385191
9:15 PM
is it even valid to set a z-index to a px value?
 
@Nyuszika7H Ah okay, thanks
 
@MattMcDonald I don't think so. No, it isn't, checked it with W3C's CSS validator.
 
user1385191
well he's somehow pulling it off
 
Whoops, didn't mean to put px. :P
 
> This profile has a very specific syntax for @charset: @charset followed by exactly one space, followed by the name of the encoding in quotes, followed immediately by a semicolon. @charset 'utf-8';
I did it exactly that way! So why do I get an error?
Ah, it doesn't like single quotes, though I think it should be valid.
 
Neo
9:19 PM
@Shaz where you using the ui easing animation?
 
@Neo In the CSS
#container #canvas .tile img:hover
 
Neo
@Shaz maybe you could find a hack like an !important min-width, min-height for the tile and put its height and width to 100% and do the transition on the container itself
 
Good evening all... I have an issue using JS and the Raphael Library, would someone like to help me :)
 
Neo
@shaz from container I mean another parent div! not #container!
 
LOL… jQuery.hoverIntent also adds mouseenterintent and mouseleaveintent… these are really long event names!
 
Neo
9:26 PM
@shaz but I think you should just do it with javascript all together
 
@Neo I could, but I don't want the tile to change at all, only the image. If I did that, I would either have overflow issues or the size change will push the other objects over
 
When I first used jQuery, I've confused why isn't .dblClick() working:
$('.obj').dblClick(function() {
    // code
});
Then I figured out that it's .dblclick(). It's a bit confused, because before I started using jQuery, I used to have onClick, onMouseOver inline event handlers.
 
Neo
@Shaz sorry from tile I meant the <img >
if you give it an absolute position you shouldnt have overflow issues
@Shaz why dont you do it with javascript to have more options?
 
There are indexOf and lastIndexOf… but is there something like allIndexOf?
 
That would be a lot of event listeners
 
Neo
9:29 PM
technically the hover rules are event listeners too
 
True
 
Any ideas on how to get Mouse Position after the viewport has been re-sized?
 
user1385191
getting the mouse position can be painful, but you first do a window.onresize event I believe.
 
Hey guys! Got a quick question
Any idea why this code wouldnt work in IE?
 
@MattMcDonald Woops, I forgot to mention that I meant SVG viewport
 
user1385191
9:40 PM
isn't it IE that handles this really poorly?
 
if you debug it this is defined
each isnt
 
IE makes me want to put a bullet in my brain.
 
When you say this.each
 
agreed
 
Shouldn't you do $(this).each
 
9:43 PM
well this is already a jq object
this is a jq plugin
 
ah I see
Seems to work in IE9
 
and in 8
and in 8's ie7 mode
 
night :)
 
yc
10:20 PM
So, potentially stupid question. Without relying on jQuery, is there a reliable cross-browser method of accessing the HTML of a <head> tag? ie, document.getElementsByTagName('head')[0].toString()? Or document.getElementsByTagName('head')[0].innerHTML ?
 
@yc document.getElementsByTagName('head')[0].innerHTML should do
 
yc
@YiJiang I don't need to worry about any Internet Explorer silliness?
 
Should be okay
 
yc
cool. thank you :)
 
10:36 PM
Dang :/
 
10:52 PM
hi
I got a problem with jQuery.ajax dataType= "json"
 
Neo
@Roel what is your problem?
 
ok so
i dunno if it is javascript (jQuery related though)
 

« first day (136 days earlier)      last day (4815 days later) »