« first day (1634 days earlier)      last day (3313 days later) » 

12:00 PM
But I don't know much about it soo
 
@THE I dont really pay much attention to jsfiddles that don't run, and I've only used D3 a few times :)
 
THE
works for me on chrome though - jsfiddle.net/nhe613kt/57
which browser are you guys trying at
 
@THE ReferenceError: d3 is not defined in console on latest Chrome here
 
na works
 
Anyone want to help me nut out a small issue... I'm picking the wrong CLASS in code and can't figure out what to use!
 
12:04 PM
@TimSalabim 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.
 
Thank you!
 
@THE HTTPS everywhere
 
Can we post question links in here?
 
THE
this may work, i am loading D3 on dom ready now instead of external link
 
0
Q: JavaScript not working - I'm missing something

Tim SalabimI have been trying to get this working and did get advice from others. Below is my code which works but when I try to implement it on the website demo which I want to use it on, I can't get it to function. My tested code which works in another instance: $(function(){ $(window).scroll(functi...

 
12:06 PM
dat title
> Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers.
 
Hahaha not good?
 
@KendallFrey Ah right, that seems to be it. I am using the HTTPS Everywhere plugin and it forces fiddle to load on HTTPS but then it tries to fetch D3 over HTTP => blocked
 
So newb, my bad... Editing now
 
@TimSalabim did you try turning it off and on again?
 
Sorry what? The pc haha?
 
12:09 PM
JavaScript
 
I have cleared cache and cross browser tested
 
THE
@TimSalabim Try running it on linx
 
Is it working for you ?
 
THE
I never thought about that
 
better define "not working" in the question
what is the expected behavior and what is currently happening
 
THE
12:13 PM
@rlemon you love d3.js don';t you
 
updated...
 
!!s/\d+//
 
d3.js :)
 
@rlemon @rlemon you love d.js don';t you (source)
 
aww
I tried.
 
THE
12:15 PM
var rectangle1 = svgContainer.append("rect")
                            .attr("x", 0)
                            .attr("y", 0)
                            .attr("width", 100)
                            .attr("height", 100)
                            .attr("fill", "red");

var bar = svgContainer.selectAll("g").append("text").attr("value", "Hahaha");
how can I add text to this rectangle ?
it just doesn't work
I couldn't understand this workout - stackoverflow.com/questions/20644415/…
 
!!urban idc
 
@towc idc Shorthand form for "I Don't Care".
 
THE
http://stackoverflow.com/questions/20644415/d3-appending-text-to-a-svg-rectangle

var bar = chart.selectAll("g")
.data(data)

can't get what is this data thing
i don't have any data
 
is @CapricaSix a bot?
@THE no idea man... d3 is weird if you don't know it
 
@mash yes
 
THE
12:26 PM
@rlemon do you have 5 minutes for a discussion ?
 
I don't know d3
 
THE
Its about jQuery
or JS, or even HTML
 
I don't know js
 
THE
oh, you don't need to know about any of them for having a discussion :)
 
!!welcome THE
 
12:27 PM
@THE 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.
 
wow~
 
@tolerious 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.
 
@THE just ask the question man
 
I want to learn javascript,can U recomand some books or toturials?
 
!!resources
 
^^
 
I am a backend engineer
 
THE
I want to make a matrix, with each rectangle has number of texts in it like list items, it has to be zoomable,

I tried D3.js but seems like it not going to help

Can i do same with jQuery
 
@tolerious neat, look at the link @CapricaSix just posted
 
THE
Divs + jQuery
 
12:29 PM
ok,thanks@rlemon
 
THE
no one helps,. bye
 
The company I work for has that "DRY" policy; Sounds like not everyone's adhering to it: pastebin.com/s1xJN0ME
 
@Mosho not sure yet - it's two days, 50-50
 
otherwise, use SVG
 
12:39 PM
I am getting some Random pings from this room
 
@TheDictator probably because of the guy named "THE"
 
Yes
No issues
 
@GNi33 if you're going to feed the vamps it is best to use organic vamp food
 
eh... he seemed so disappointed with us
I couldn't take it
 
he's been in here before asking about the issue.
 
12:44 PM
people need to learn how to search for stuff
and actually learn
 
he's been suggested things before but (seems to) want a copy paste solution
 
@GNi33 They need to learn how to learn?
 
no, they need to learn how to search for stuff, and learn the stuff they search for then
but yeah, you could argue that people need to learn how to learn, I guess
 
@GNi33 well then..... I know so much about porn
 
0
Q: JavaScript calling CSS classes, changes image on scroll down in test, no change on dev site

Tim SalabimI have been trying to get this working and did get advice from others. Below is my code which works but when I try to implement it on the website demo which I want to use it on, I can't get it to function. My tested code which works in another instance: $(function(){ $(window).scroll(functi...

 
12:49 PM
Is there like a trick to get Angulars $log to log the actual source of the logging call, instead of all entries originating from angular.js?
That
 
Guys , i need to alert the file path
i use this code
$("input[type='file']").change(function(){

alert($(this).val());

});

what if this input file have " multiple " attribute ? how can i print all files
when i try it , it only alert the first file
 
One "file" input should only have one file. You need several file inputs if you want several paths
 
@OliverSalzburg you can decorate that and do whatever you want with it - for example you can capture the entire stack trace inside your version of $log and filter out the first line (the actual $log call) and get whatever you want.
 
the JS API for multiple selects is pretty stupid
 
@dievardump

i have one input type file
it has multiple attribute
when i select multiple files using ctrl Key
how to get all file names values that i choose ?
 
12:53 PM
i was thinking jQuery takes care of this, but it probably doesn't
 
console.log(this) and then you search.
 
@BenjaminGruenbaum Sounds good. I haven't worked with decorators yet though
 
value doesn't return you an array of selected options, out of what reason soever
 
stackoverflow.com/questions/29492138/… in case you want some easy rep ;D
 
iabti.org/charity this is nice
 
12:54 PM
it just returns the first selected
 
@rlemon not as nice as you.
 
.selectedOptions is the property you're looking for
 
:)
 
@rlemon Oo
 
I don't angular, but according to google Zone provides better stack traces so you can see where the error originated and not where it was thrown
 
12:57 PM
that's kind of irrelevant (zones), it's more relevant to Angular 2.0
 
@rlemon Oh, yeah, I use async stack traces all the time. But that requires me to first know where to set the breakpoint, which is hidden by the way $log works by default compared to what I would get from using console.log directly
It's just a minor inconvenience. I just thought I'd bring it up in case I was missing something obvious
 
I need someone to confirm something.... .logo pull-left... Is that the correct div class to call on my site?
 
jQuery peeps:
<input type="number" class="foo fizz" />
<input type="number" id="bar" />
$('#bar,.foo').on('change', function() {
    console.log($(this).selector); // I want .foo or #bar
});
is this possible?
I could (I think) use .is
but that isn't as nice :(
console.log($(this).is('.foo'));
and then I need to list all of the possible selectors
 
In this website... http://www.templatemonster.com/demo/52089.html
Is the correct div class to call for JS to change the logo "logo pull-left" ??
 
@rlemon what if an element matches both?
 
1:11 PM
@JanDvorak it wont
 
@rlemon this.id and this.className ?
 
jQuery doesn't know that
 
@GNi33 className would return "foo fizz"
also, it isn't a selector
neither is an ID
 
replace " " with "."
well, you can easily build selectors out of that though
 
then I may as well just hard code the entire thing :P
@GNi33 how do I know if the elements selector is an id vs a class?
 
1:13 PM
It's neither ;-)
It's a comma combinator
 
what?
can you tell me the use case you need this for?
 
I need to figure out the 'selector' of an element that is clicked on
from the list of assignment selectors
 
and I don't understand why you can't just build it out of id and className
 
$('#foo,#bar,#big,#small,.fat,.yomama').on('click', function() {
    // `this` is the element clicked that matched from above.... I need to know which selector in the list it matched.
});
 
@rlemon Does the event object contain anything that can be used?
 
1:16 PM
@ivarni not that I can see
$('#foo').selector returns '#foo' but inside of the click there is no more selector
$().selector returns ""
 
hm
 
what I'm asking I'm 99% sure isn't baked into jQuery
will probably have to refactor - tis a silly requirement
 
well, jQuery will go over each selector seperately and bind the handler
 
Yeah, it seems an odd thing to do
 
you could keep an object or array containing your selectors and check your returned element with that
 
1:17 PM
@GNi33 yea, using .is
but that is so ugly. :(
 
for example, yes
 
Well you're already using JQuery...
 
@rlemon Why?
 
@Zirak BECAUSE I NEED TOO !!!
 
it's not exactly nice. no
but the problem seems to be a weird one
why would I even need to do this?
 
1:18 PM
the problem is I built my own data binding and it sucks very very badly and now I'm hacking around year ago stupidity
well I'm going to take a long walk and re-consider what I'm doing with my life.
 
Step 1: Cut a hole in the box
Step 2: Discard jquery
Pretty sure step 3 is blowjobs for eternity
Aaannnyyy day now
 
okay, how about this....
1 message moved to JS trash
 
Whats the best site for dev testing and sharing, jsfiddle?
 
why @rlemon ?
 
@TimSalabim use what you like best
 
1:24 PM
you are question banned so you ask on another site and post the link here? and you wonder why I moved it to the bin??
 
yes , what is the problem then
?
 
@TimSalabim They all suck
 
Are't we all nice today.
 
@Zirak TY
 
1:25 PM
@TimSalabim he's not lying. they do. jsfiddle is probably the best of the worst
 
@TimSalabim plunkr is nice, so is codepen, and cloud9 (c9.io) is also pretty cecent.
 
jsbin is okay
@BenjaminGruenbaum codepen is terrible to actually work with the code
 
Ok! I have something to show you wizards....
 
@rlemon that's true.
 
@Bassem If you're question banned, fix that
@rlemon I really, really, really dislike jsfiddle. Even jsbin is better, liveweave also somewhere there.
 
1:26 PM
the goal is to solve an issue
 
Your goal is
 
@Zirak I dislike 'live' editors
albeit jsbin does have loop protection
which is nice
 
You can kill them any time
 
@Zirak I can make jsbin non-live?
 
@rlemon , Really , you have very bad communication skills , you are not a good support
10
 
1:27 PM
neat, good thing I don't work in support
 
@Bassem We're not technical support, go away if you think we are
@rlemon You can kill the js auto-running, yes. Not the html/css ones though
 
haha
 
i did not said my words to u @zirak
 
@Zirak I'll have to go over the options again. thanks.
 
I FIGURED SOMETHING OUT!! If my script runs in an environment where JQuery 1.9.1 is enabled, how do I ensure it's enabled on a web page??
 
1:28 PM
@TimSalabim you include it in your website
 
With a tag or a script?
This is why my JS isn't working :p
 
@TimSalabim import it optionally if it's not already included, google how to do that.
 
how about a script tag?
 
<script src="jquery.js"></script>
 
Doing it, thank you!
 
1:29 PM
and make sure you include it before your script, before that problem comes up
 
o_O
 
@mash can I be Hawkeye?
 
@rlemon You can be Robert "Hot Lips" Eddison
 
@rlemon No, you're already not a good support
shame on you
 
@Zirak but... but... but ...... then I have to sleep with Frank...
Hawkeye always looks so drunk and happy
 
1:33 PM
I'm full of love for bjb on the mod election thread
 
anyone here have experience using Mocha with meteor/mongo?
 
@BenjaminGruenbaum On Second Rikudo's nomination? He's on fire
 
@rlemon if i have just added that script to a server in those tags with the correct file name and have included in the head of a page will that allow it or do i need the src"" part in a JS script that uses it?
 
@Zirak he nominated himself (bjb), I left a really nice comment for Dor
 
@BenjaminGruenbaum NO WAY
 
1:35 PM
YA WAY
stackoverflow.com/election
 
The fact it's not a link here (no http:// is just to be annoying)
You can leave a loving comment
 
 
use a cdn
 
I'm trying to get sites working and my friend isn't here to help!!
 
1:37 PM
and fallback to a local copy*
 
@Zirak it's not our fault he came out crooked.
 
I would have loved to see the post and comments from Dan
apparently he pulled out after being called out on "things"
 
@rlemon What?
 
haven't even been on here much, and what's all this complaining about the ecmascript technical support we provide??
 
1:38 PM
Yeah, just noticed
 
eats my own pants
 
@BenjaminGruenbaum that guy who was editing posts and commenting telling people to delete theirs because his (often pointed at his own) answer was better
 
Too late, they are already consumed
On the upside, paul irish sent me a friend request on facebook.
 
and what's with the lack of outsource jokes while our indian friends are present?
 
o_O it's down for real
 
1:39 PM
@rlemon lol, nice :D
 
ohh it's not
 
okay, already decided on my votes for the mod-elections
 
can't vote yet :/
 
@GNi33 nominations aren't closed yet
 
1:41 PM
I know
 
Also, it's Second, Jon and Martijn most likely but it still might change a lot. We'll see
 
but I'm pretty sure that my votes stand
 
everything is fine as long as no php developer gets elected
 
if you judge someone based on the language they make their money on, you should be sprayed in the face with orange juice.
 
@BenjaminGruenbaum yeah. These are the best three candidates in my opinion
 
1:44 PM
Which one of these is the correct way to put JS in....
<script src="jquery-2.1.3.js"></script>
or
<script type="text/javascript" src="jquery-2.1.3.js">

$(function(){
$(window).scroll(function(){ etc
I mean JQuery!!
 
ohh really.. they could just switch the language too if they don't like it themself
 
@TimSalabim you can leave out the type
 
doesn't matter, with a html5 doctype the type is not needed anymore
 
@TimSalabim You either put a src attribute, or put content inside the script, not both.
 
ok thanks
 
1:45 PM
@mash easier said than done
 
I think I have figured out why this feature isn't working....
If there is a script in a website which keeps the navigation static at the top of a page would that override a change image on scroll script?
 
gonna be lazy and ask this before find out on me own, but any regulars from this room, going for mod?
 
lie no one needs to work if they don't like their work.. you can live pretty good as a minimalist
 
also quite a few regular taverners
 
I'm not actually running for Mod.
 
1:47 PM
oh hmmm.... @rlemon?
lol
yeah I didn't peg you as the type to take that seriously
 
no way. more work than it is worth imo
I would have to go on main yuck
 
that, and I imagine your sense of humor being misunderstood tbh lol
 
tip. never trust rlemon not to deliver lemons when drunk
 
which is ironically, exactly why I'd want to vote for you
 
I have no sense of humour
3
I'm a stick in the mud
 
1:49 PM
disappointing
 
maybe what I see as humor, is really more me sympathizing and being a lurker lol
 
^ that's @rlemon
just FYI
 
but I keep imagining a muddy slide for some reason
o/
 
o/
 
@rlemon <3 :)
 
1:54 PM
Anyone want to share a screen with me and check out what I'm seeing?
Or screenshots better?
 
user image
2
 
 
mmmmmm
 
these are the kind of corrections, elaborations, and emphasis our moderators need to be practicing. you've got my vote
 
1:56 PM
Have some semi-advanced JS (.. for me) I think this adds Extended Properties to the Content object. How do I check if I added a value pair?
var ContentObj = new Content();
ContentObj.ExtendedProperties = new Array();

function AddExt(k, v) {
var p1 = new Property();
p1.Key = k;
p1.Value = v;
var ext = ContentObj.ExtendedProperties;
ext[ext.length] = p1;
}
 
console.dir
 
Can somebody please help me
I need to figure out how to replace a logo image on scroll down
Of a website
Been stuck for so long :'(
 
document.body.addEventListener('scroll', function(e) {
  if( document.body.scrollTop > 0 ) {
     img.src = "foo.png";
  } else {
     img.src = "bar.png";
  }
});
 
@GNi33 we'll see :)
 
Testing now
 
1:59 PM
yep
 
@monners No, but it's on my to-read list
 

« first day (1634 days earlier)      last day (3313 days later) »