« first day (1369 days earlier)      last day (3594 days later) » 

12:04 AM
@rlemon Yes please
Actually, I'd settle for having Wednesday off
 
!!are you being hosted twice?
 
@KendallFrey Certainly
@KendallFrey Of course not
 
well
 
!!go out and eat or too lazy and eat some old pudding I found in the fridge
 
12:06 AM
@Mosho go out and eat
@Mosho go out and eat
 
@rlemon @Zirak ???
 
no that is me
sorry
!!are you alive
 
@rlemon All signs point to yes
 
fixed
 
Hey, question:

how come:

var appended_county_list = $(this).closest('tr.row').find('[data-field_name="select_a_county"] select');

worls but:

var appended_county_list = $(this).closest('tr.row').find(countySelect );
doesn't
 
12:08 AM
@Hybridwebdev Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Hybridwebdev what is countySelect
 
0
Q: Is this the correct way to chain promises in angularjs?

redgeoffI have a function foo that calls another function moreFoo and I want to wrap the function calls in promises so that the promise returned by foo returns after moreFoo has resolved. Here is my solution: function foo() { var defer = $q.defer(); console.log('doing foo'); moreFoo().then(defer.r...

 
woops
var countySelect = $('[data-field_name="select_a_county"] select');
 
because that's not a selector
 
because it is then passed a larger group that isn't specific to the $(this).closest('tr.row') parent
 
12:10 AM
but doing that in the same context elsewhere in the app works
 
it tries to find a specific element which may or may not be in the closest tr.row
 
dumb luck?
besides, the former would be less work on the browser
as it knows the context
 
but shouldn't the variable, when passed into find, equate to a string?
 
nope
$('selector') is an object
 
so
var appended_county_list = $(this).closest('tr.row').find('+countySelect+');

wouldn't work either?
 
12:12 AM
if (!selector || typeof selector !== "string") {
    return results;
}
so basically it returns the results of the original query
not what you want
 
cool
 
@Hybridwebdev var appended_county_list = $(this).closest('tr.row').find(countySelect.selector);
if you really want
 
for the sake of consistency, yes I'd love to be able to use the variable, instead of hardcoding the string. I want to be able to easily change the variable if need be
 
then that would work
 
12:15 AM
this is a very small portion of a much larger project Im working on
 
just make the string a variable then
 
you could also just save the string and pass it to countySelect too
 
but using the selector outside of the context will not yield the same results.
@Mosho but why?
that is is pointless to select them, then re-select them again
 
@Mosho Well that seems to work, thanks
 
> Hey DOM, what's up? cool cool. so I want selector from you cool? okay awesome. give that too me. ohh yea, but later I don't actually want these elements, I just want to reference their selector at a later date. so here it is more specific like right. give it too me again. yea, I don't care I'm a horrible person just do it!
 
12:19 AM
my guess, as to why it works one place and not the other, is because in the 1 function, it already knows which parent selector it's targetting, whereas in the other context, im iterating through and searching for the same selector
 
well, the lemon is right
you could do countySelect.parent('tr.row').closest(this)
unless I misunderstood
@rlemon but who says he doesn't need that selection anyway
 
his code
 
well basically there's 2 context in which I need the selector. Either by targetting it directly, or by iterating through its parent and then dealing with each instance
it seems the issue is with the context in which i iterate through parents
 
running var countySelect = $('[data-field_name="select_a_county"] select'); just to grab the selector afterwards is stupid
plain and simple
 
but regardlress, Moshos change fixed
 
12:23 AM
adfs
 
@eduardowarded Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@rlemon ah, didn't see he posted it
 
well if you're going to use the same string in various places, why not commit it to a variable and then reference the variable instead. Cleaner code and easier to maintain
 
store the string
accessing the DOM has repercussions
 
@Hybridwebdev he's saying, and is right, that you execute the selector and get the whole list of elements you don't use
 
12:24 AM
accessing it twice when only once is needed is better
 
you only need those subsets of the elements, so just select those
 
oh I get it
 
:)
 
but wait
 
@Mosho you still got my #?]
 
12:25 AM
he does apply the event handler to the entire list
 
text me your address
 
@rlemon I don't have your # :(
 
@monners look hard, it is there
 
51 nelson ave, kitchener
 
dude, text it to me so I have record
 
12:27 AM
No I think your right
 
;)
 
I can't find my phone
 
@Mosho Nice tree
 
and this is on the record :P
@monners yeah, I was 'mirin it at first
don't even notice it anymore
 
Also, I think Google street view may have busted you masturbating through the window
 
12:28 AM
@monners ........
 
@Hybridwebdev basically what he suggested was selecting all elements that matched that query, THEN using the same query to select specific elements from that list. but in both cases it selects them directly from the DOM which is a performance hit. you would be better to select them when you need them and not twice
 
@monners busted? I paid them good money to let me know when they were coming by
 
agreed
 
@Mosho Bravo!
 
heh
thisRoom++
 
12:30 AM
yay \o/
 
so if stateSelect = '[data-field_name="select_state"] select';

then

stateSelect.live('change', function() {
would be what
 
don't use .live
 
stuck using old jquery version :(
 
use .on or .delegate if you have them
what version ?
 
1.1ish
 
12:31 AM
ouch
 
if stateSelect is a string, $(stateSelect).....
 
oh derp $(stateSelect.selector).live('change', function() {
 
basically you need to learn what a selector is vs other
then you will realize where your error is
 
beautiful
no i know what a selector is
 
12:33 AM
a selector is just a string.
 
Really love SO
 
it is a CSS selector matching the set of elements (or single element) matching the element.
 
Wow, was having a small performance issue, but changing things around as advised, it's nice and fast now
 
like when you write .foo { color: red; } you are matching all elements with a foo class
 
yes
or $(.div > .foo > .bar");
 
12:36 AM
when you pass a selector like .foo to jQuery you are grabbing all of the elements with a .foo class
 
woops forgot a "
 
that would match:
<div class="div"><div class="foo"><div class="bar">hello</div></div></div>
 
ya
the point I struggle, is just context
which is my biggest stumbling block with every new language i learn
 
if you don't know Javascript it would benefit you to learn it before jumping into jQuery
 
Very that
 
12:40 AM
well as you can see from my code, I can hold my own with jQ, still in the process of learning a few things though
 
that's kind of a question of extent though. How much JavaScript should one have under their belt before using jQuery?
I reckon someone should at the very least be able to build a slider with vanilla before considering libraries
 
well from what I've seen, jQuery tends to spoonfeed things to you. It makes it very easy to be lazy
 
It's a tool that can be convenient, but it can also be dangerous
 
jQuery is a DOM abstraction library first and foremost
 
whereas from what I've learned of JS, it's a freaking nightmare :P
 
12:42 AM
if you don't understand what you are abstracting, how can you proceed?
 
that's assuming someone can know the nightmare that is the DOM API
 
it isn't so bad
it is verbose and has mistakes sure
but it isn't hard to understand
 
$(stateSelect).live('change', function() {
should equate to
$(stateSelect).on('change', function() {

no?
 
it isn't a 1:1
 
@Hybridwebdev Check the docs
 
12:46 AM
.on closer mirrors .delegated
 
well crap .on doesn't seem to work
 
@SomeKittensUx2666 well crap on doesn't seem to work (source)
 
1:11 AM
lol
 
0
Q: I have written a bit of jquery and am unsure as to why it is not working

Matt HuijsseI have been writing a website for my partner and am trying to create an image carousel using jquery to change the background style property however it hasn't been working so far, please take a quick look and see where I've gone wrong I have a bit of php running to count the amount of photos in a...

SO in a nutshell
 
did you see the question which got -17 a couple days ago?
 
@FuzzBall007 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@FuzzBall007 Nope, link?
 
it boiled down to "do the code for me or you're stupid"
 
1:23 AM
Nice. I wish 10k allowed me to see comments
 
user1607528
1:35 AM
If the html markup that is not visible by default is inserted to body with jquery when page is loaded, will a script that makes it visible after 45 seconds will work
 
user1607528
Basically, how do I append html markup to the body "as" it was written inside the body tag before
 
@SomeKittensUx2666 I can only imagine what they must have been
 
@Muhammet createElement?
 
 
1 hour later…
2:47 AM
so what are my options to get a json from a server that doesn't send Access-Control-Allow-Headers
jsonp?
well that doesn't work either
moving that shit server side I guess :(
 
3:26 AM
Carrier pigeon
3
 
4:05 AM
In this situation, gzip /dev/inside to deflate, then pipe the compressed air to /dev/input to clean your keyboard. Avert your eyes when you do.
2
 
 
1 hour later…
5:21 AM
@Mosho Hi Mosho, I have having an issue with multiple NVD3 charts in single page, the first chart looks ok, but for others the width has shrunk. jsfiddle.net/rdesai/vfe2B/102 I have set the min-width in the CSS though.
 
0
Q: Parse.com CloudCode does the codes after response.success() get processed?

Oscar Yuandinataif I have a code like this if (request.params.friends != null) { _.each(request.params.friends, function(friend) { // create news var News = Parse.Object.extend("News"); var news = new News(); news.set("type", "ask"); news.save(); }); response.success();...

 
5:55 AM
anybody around? :)
 
yea
 
you know much about WebAPI/AngularJS?
 
nop, sorry
 
6:30 AM
Hello good morning.
I have some questions :
- What do you have to keep in mind when creating a web game?
- What do I have to think about when my game should work x-browser?
- What is a good technology to use creating 2D games.
- What is a good way to store your 'scores' data for multiple players so there is scoreboard on the end with the top players.
- How do they these days store scores into the db ( a few years ago while doing AS3.0 I used AMFPHP for doing db calls)
 
@Duikboot There have literally been entire books written answering just some of those questions
Actually, every one of those questiosn
 
Yeah probably there are a lot of them.. but books aren't so recent I gues.
 
It all depends on what sort of web game, I guess :P
A massively multiplayer webgame, like those strategy time-based ones. Or just a word or draw game with lobbies
 
It's just moving an object with some obstacles.
[offtopic] Is this site loading content or a directory listening? maes.be
 
6:50 AM
@Duikboot ssl error
 
probably cause he logged in with fb or something, so he gets https
But if you remove the s it's k
 
HTTPS is indeed showing me the dir-listening.
HTTP is showing me the good website.
 
7:06 AM
O_o strange
Dat bug? xD
 
7:29 AM
what is the site for search error? Because I finish one site....
 
morning morning
 
Morning :)
@MirkoCianfarani Can you try to explain that again? This question didn't really make much sense
 
Morning
I remember the site where I put the link of my site and it search anomaly and error...
 
you mean the w3c validator?
 
Thx ... Exactly find stupid 38 error miss < or ....
 
7:41 AM
people still use that?!
 
@DrogoNevets What do you use to validate something like an rss feed or xml or even html?
Or do you just assume it's all fine
 
@Magikaas i check in multiple RSS readers, etc, if they all render correctly......
xml can be done with far better ones than the w3c one
 
Hi guys. I am having issue with focusout, it is not working as desired. In my code here: jsfiddle.net/rdesai/csTS7/171, if you add an element and click on it to edit, after editing if you click somewhere else, it doesnt focusout. Not sure why this is happening.
Clicking somewere else needs to save that item to localStorage.
 
"isn't working", and 700 lines of code!

Good luck with that ?
2
 
what exactly do you mean?
I click to edit something
and then click somewhere else seems to be working for me
 
7:53 AM
At line # 377, I have the focusout which aint working. If I click on some other task item, it works.
@Dave You should be able to click literally anywhere and the textarea should close. I am stuck there.
 
that is happening for me
I removed your commented out console line
and I click literally anywhere
and focusout fires
and it appears that your code is working
 
Strange. I checked on Chrome v35 and it was giving me issues. Dit the focusout work for you at the first click itself?
 
let me check
 
ok so why does git think i am on develop but git bash say im on a different branch?
 
@DrogoNevets git branch
What does that give you?
 
8:06 AM
@SecondRikudo develop
 
@DrogoNevets That's the full output?
 
$ git branch
* develop
  feature/Gruntify
  feature/addSass
  feature/includeCommonJSFiles
  feature/sortOutMimeTypes
  feature/updateCommonVersion
  master
cat: .git/rebase-merge/msgnum: No such file or directory
cat: .git/rebase-merge/end: No such file or directory
/c/proj/**************** (feature/addSass|REBASE-i)
 
@DrogoNevets Okay, and what do you expect to be the output?
 
yet i have ^^ in git bash
i expect it to say (develop)
nvm sorted it
 
@RahulDesai before I click add it doesn't fire
 
8:09 AM
it was confused with a rebase i started but someone else finished, git extensions had picked that up, but not git bash
so i just manually aborted and now thinks im on develop again
silly computers
 
@Dave didnt get you. did you try to click on Add after editing?
 
!!summon 43899
 
on creating a new task, clicking add or otherwise does not fire the focusout event. But clicking anywhere when editing a previous ask does. Is this not what you want your code to do?
 
@Dave yeah, thats exactly what I want. I cleared the cache, still the problem persists. :(
 
hmm
running the same version of chome
are you sure you are updating the fiddle after editing the code?
 
8:23 AM
@Dave Yes. I checked it on my neighbor's computer. Same problem, man. I am using this version now: jsfiddle.net/rdesai/csTS7/172
 
@RahulDesai can you explain to me what the problem is?
 
 
@SecondRikudo Please refer to this code jsfiddle.net/rdesai/csTS7/172 . Add multiple items in the list. Clicking on the item text provifes functionality of editing it. The problem is that the focusout event (line # 377) does not fire at my first click somewere else. After I click on the text of some other item, it is fired. Also it is fired when I click on the textarea at the bottom.
 
I frequently see this kind of things in the main thread...
 
0
Q: How to share Pic with Post Data using facebook Application?

ramanI am using following code to share functionality: HTML CODE is: <div id="fb-root"> </div> <img src="share_button.png" id="share_button"> My Jquery Code is: <script> window.fbAsyncInit = function () { FB.init({ appId: '********', status: true, // check login status ...

 
8:30 AM
@RahulDesai What should happen when it's fired?
 
please help
 
@Dave Can you please tell me where exactly you clicked for that event to be fired? On text of some other item or on the textarea at the bottom?
 
The editing capability vanishes?
 
0
Q: For which status codes promise resolving

Narek MamikonyanI want to clarify for which http status codes promise is resolving and for which is rejecting, how I understand it resolving only for 200 case and the rest is rejecting it is ? or we have some other cases ?

 
@SecondRikudo Yes, and the edited item is saved in localStorage.
@Dave Sorry if thats a weird question. ;)
 
8:31 AM
@RahulDesai Well, I'm not sure that jsFiddle allows you to keep localstorage..
 
@Second it seems to be working
 
Oh wait, it does
 
@SecondRikudo It does. I have it working here.
 
@RahulDesai I can't reproduce the problem, it fires nicely to me.
 
:-|
 
8:33 AM
@Rah I'm not sure
@RahulDesai, I mean haha. There does seem to be some bugs wit the undo/redo buttons
 
@Dave I tried clicking on the white space inside other items in the list and it doesnt fire.
@Dave Yeah, in undo/redo there are few things remaining to develop
@SecondRikudo Try clicking on the white space inside other items in the list. On my side, it doesnt fire if you do that.
@Dave Otherwise if you click on the top bar or the whitespace at the bottom, it works nicely. Did you get my problem now? :)
 
@RahulDesai give me two seconds
 
sure
I think its probably because of that drag/drop functionality from jQuery UI, isnt it?
And yes, it is!
But I want to keep it.
 
hmm
that's what is working for me
 
@Dave that site is blocked in my office :-|
 
8:46 AM
tinypic?
 
@BartekBanachewicz Hello
 
!!> room.dead()
 
@BartekBanachewicz "ReferenceError: room is not defined"
 
NOOOOOOOO
 
8:48 AM
ok
sent
 
This question appears to be off-topic because it doesn't make sense — dystroy 21 secs ago
 
thanks :)
@Dave Got your GIF. After editing, if you could try cliking on the space below the star or the space between the star and the textarea, the focusout event isnt fired.
As mentioned earlier, its because of the jQuery UI drag/drop feature. Its messing with that.
 
year there seems to be some extra boundaries
but after the drag has happened focusout fires
 
yeah
 
and it doesn't fire on a single click because the textarea is still focused
 
8:58 AM
but if the user attempts to save the item by clicking on that white space, it doesnt work.
yes
 

« first day (1369 days earlier)      last day (3594 days later) »