Peppin: Is there a way to check what element has been clicked?
Depue: Or do i have to compare pageX with every element on page?
Gentleman: Sal: it’s the “target” property of the event object.
Mate: Sal: Event – Web API Interfaces MDN https://developer.mozilla.org/en-US/docs/Web/API/Event
Velten: Yes, but i can’t use target, bevause the element i’m trying to click is a 1px line
Brobst: And to make it simple to catch, i added a 5px per side clickable area
Chanler: So, if i use target, it will only work if i click on the line
Eylicio: Don’t know if i was clear
Mattia: Its a 1px line, but i want to add a 5px tollerance on both sides
Gentleman: Sal: if you give the line 5px of margin on both sides, then clicking on the margin will be a click on the line.
Defusco: I have created a video of the behaviour http://sendvid.com/9iivpzny as demoed in this fiddle https://jsfiddle.net/z09anyn2/2/
Badzinski: Someone help me with this: http://pastebin.com/Me11fFBr
Heaberlin: That is the output when the page is loaded
Montono: Folks, I am trying to get all strings between two brackets in a text using regex. https://jsfiddle.net/11ueputd/ But I am geting no success. Anybody can help me?
Arnsworth: Im trying to show a problem but my code doesnt seem to behave on jsfiddle https://jsfiddle.net/xn8w6nxk/1/ its a simple point click
Goldhammer: Django_, so the problem is that $scope.testme is undefined right?
Fallis: GreenJello: thanks anwyas got it.
Maytubby: Well, that’s because $http.jsonp is most likely async
Drobny: Baxx: the jsfiddle behaviour is because scrollbars appear, cause your body is larger than the window, cause your css injection isn’t working properly
Grismore: In other words, by the time console.log prints $scope.testme, the $http.jsonp call hasn’t call your function that populates that property
Drobny: Baxx: or rather the css you’re injecting is not proper css
Scearce: Bleh. It seems as if I forget everything unless I constantly use it.
Defusco: Shoky: ha ****, yeah I just zoomed out on the local page and it works as expected . I was really confused there. I’m not following about the CSS ?
Aemmer: Right now, I’m trying to remember the syntax to check if a given integer value is inside an array that looks like var someArray = 1, 2, 3, 4, 5 ;
Drobny: Baxx: you have commas , instead of semicolons ;
Elden: And also, I’m trying to add to that array. I guess for the second problem, I do someArray.push123;?
Zogopoulos: Undrinkablesoup, so basically indexOf?
Drobny: Baxx: height: 100%, padding: 0,
Gentleman: Undrinkablesoup: yes, but it’s best not to mutate things.
Quilter: CamC try something like https://jsfiddle.net/11ueputd/1/
Defusco: Shoky: ah of course, school boy all round then, thanks :
Gentleman: Undrinkablesoup: change
Belback: Gentleman: I don’t understand what you mean.
Gentleman: Undrinkablesoup: ie, don’t add something to someArray. make a brand new array using concat.
Gentleman: Undrinkablesoup: var newArray = someArray.concat123
Tschoepe: I fail to see the difference.?
Defusco: Shoky: yeh it works now, thought it would be something trivial, cheers
Kubilus: Pikul: that means one is running in thebackground right?
Gruzinsky: Why make a new array?
Gentleman: Undrinkablesoup: the difference is that then “someArray” never changes, so it’s easier to reason about what it contains, and it’s easier for the engine to optimize it.
Gentleman: Undrinkablesoup: mutation in general makes code harder to reason about.
Pono: Ankr:how does that help?
Huschle: Var someArray = 1, 2, 3, 4, 5; someArray.indexOf1 -1; /* true */ someArray.indexOf0 – 1; /* false */