« first day (879 days earlier)      last day (4062 days later) » 

7:00 PM
why would you throw around with jqueries if you just could throw around with $?
 
so i grabbed it with some CSS and thinned it down.
 
that would make us much happier
 
YES! I love you, @SOChatBot
 
but now it snaps around when i click it. how can i change the handle moving animation?
 
Show us a demo
 
7:00 PM
so it stays with the mouse instead of staying 10 px to the left of the mouse
okay one sec
 
@FlorianMargaine mouhahaha
 
@Aerovistae wait, is that jQueryUI?
 
yes...
 
@Aerovistae good?
Can not see the good in your sentence
 
well it has dollars in it?
 
7:03 PM
I like dollars, but nly in my pocket/bank account
 
okay here y'all go
grab the handle, and slowly drag it
you'll see it snap to the left of the cursor
i don't know what to modify
 
@rlemon Illegal, I'd say.
 
@FlorianMargaine same feeling.... damn everyday
@FlorianMargaine never happened for me soo meh dunno but when that hapens with node.js i am like whooooooooooooooooa
 
@SomeKittens yea the more i've looked into it I'm going to file an injunction against him
I don't want to sue, but I don't want him to continue
I'll fire him the email tonight asking for him to stop - give him 5 days to comply then file the injunction.
@Aerovistae margin-left: -5px; on the handle will center it at least
 
@FlorianMargaine ^ --- now thats a good Yo Mama Joke!

For those of you who dont understand ... in dbz tha dragon can fullfill any wish even bringing back dead to life :D
 
7:15 PM
or if you wanted to alter the plugin source code. look for these lines.
		if(!this.options.axis || this.options.axis !== "y") {
			this.helper[0].style.left = this.position.left+"px";
		}
		if(!this.options.axis || this.options.axis !== "x") {
			this.helper[0].style.top = this.position.top+"px";
		}
they appear to control the position of the slider
 
So I've got an angular controller that is basically an autocomplete. When the query property is updated, I make an ajax call and grab some data. I want to make it so it will only run the ajax call after the user stops typing for about half a second. Is a timeout the best way to do this, or does angular have something built-in for this?
 
@rlemon no I'm totally happy just to change the margin, that worked perfectly, thanks
 
@Darkyen ...congrats, your humor is on the same level as a 13 year old nerd's.
2
 
@Zirak LoL
I JUST FIND EVERYTHING FUNNY ATM
 
> Q&A Planbox: "when clicking on the left menu buttons are moving around, ask Michel for a demonstration."
Do you mean: When I load a page, after the 150ms it does take to the browser to get the CSS file, applying the Custom Font to the page elements make it "bounce" quickly?
 
7:28 PM
@Darkyen butts.
 
@Darkyen The holocaust
 
can I use toFixed(2) without having whole numbers display as for example: 100.00 but instead as 100?
 
@Zirak fuck u
 
@captainrad If you want to have a certain maximum amount of positions after the dot, you can use my utility method: github.com/Zirak/SO-ChatBot/blob/master/source/util.js#L118
 
i am crying now
@captainrad parseInt maybe
 
7:32 PM
thanks, I'll investigate both
 
@Aerovistae np
 
@OctavianDamiean You'll like this: imgur.com/7AoyZfh
 
@captainrad If you want to keep as few digits up to a maximum of two, you can do this: Math.round(number*100)/100
 
oh come on, who stars the holocaust?
 
@Zirak guake?
 
7:33 PM
Tilda
 
Dbz
Hey guys, I have a quick jQuery question about a function I made that isn't working. I'm using a selectable, and I want it to select the last selected element (from local storage) when the page loads
// Restores selectable state to saved value from localStorage.
$(function() {
	$( "#selectable" ).selectable({
		create: function(event, ui) {
			$("#selectable li").get(localStorage["chosen_cache"]).addClass("ui-selecting");
		}
	});
});
Does anyone see what I'm doing wrong? Because it doesn't work
 
@Dbz ur name is ... dragon ball z ?
 
Dbz
Daniel Burt is my real name
Daniel Burtz
Dbz
 
(y)
wow ur initials get to be DBZ!
 
Dbz
A lot of my frineds call me dbz
 
7:37 PM
thats awesome :D
 
Dbz
Haha ;p
Okay, so I don't think the create event is firing >.>
I will need to do an onload event
 
@Zirak yaaahyyy! :D
 
Dbz
Anyone know if that's possible? It's not the selecgtable api
 
@OctavianDamiean I'm curious what happens after purple. It probably goes back to green, but I have to find out. For science.
 
7:39 PM
@Dbz can you confirm if it's firing or not?
Put a break point or console.log in there?
 
Dbz
Yes, it's not firing. I put a console.log in there
// Restores selectable state to saved value from localStorage.
$(function() {
	$( "#selectable" ).selectable({
		create: function(event, ui) {
			console.log("Chosen Cache is: " + localStorage["chosen_cache"]);
			$("#selectable li").get(localStorage["chosen_cache"]).addClass("ui-selecting");
		}
	});
});
That console.log() never fires
 
@GNi33 Check out "Imagine Dragons". You might like them
 
Do you have an element with id #selectable
 
Dbz
Yes, it's a list
<ul id="selectable">
 
oh god, i'm living near a cathedral, now they're going dipshit with their bells. STFU!
 
7:41 PM
posted on March 13, 2013 by ericbidelman

Shadow DOM is a difficult topic to wrap your head around. It's just complex. It introduces unfamiliar concepts that we're not used to on the web. Shadow boundaries, styling scoping, event retargeting, insertion points, shadow insertion points, host nodes, distributed nodes,...the lingo goes on and on. TRY THE DEMO One thing that's conceptually taxing about Shadow DOM is t

 
Dbz
@phenomnomnominal I think the create event doesn't fire on page load
 
@Dbz, it's isn't meant to be firing on page load because the jQuery ready function doesn't fire until after
 
Dbz
How can I make my function fire on page load? I want to "select" the last selected element when the page loads
 
Well it will
 
In jquery, is it better to alway get the top element or do .parent() when we set many actions in it?
 
7:43 PM
The jquery ready function gets called, then the selectable gets made, then the create event should fire
 
thisObj.css({
						zIndex: 100
					})
					.children('.color')
					.animate({
						'opacity': 1,
						'width': width+50
					}, settings.timeAnimHover, settings.easeOpen);
				thisObj.children('.grey')
					.animate({
						'width': width+50
					}, settings.timeAnimHover, settings.easeOpen);
				thisObj.children('.infos')
					.animate({
						'bottom': 0
					}, settings.timeAnimHover, settings.easeOpen);
 
Try adding a listener using .on
 
like this
 
did anyone ever went to another room thinkings its JS n stayed there for a while without realizing it !!
 
or with .parent()?
 
7:44 PM
!!/tell MikeBoutin format
 
@phenomnomnominal done
 
@MikeBoutin you need to calm down mate
 
That's not a heck of a lot better
!!/live
 
@MuhammadRaja Da fuk?
 
Dbz
@phenomnomnominal, can you give me an example?
 
7:45 PM
@AmaanCheval yeah, they sound nice :)
 
$("#selectable").on("selectablecreate", function( event, ui ) { ... } );
 
Dbz
Thank you. I shall try it
 
@MikeBoutin you was typing one sentence in more then 1 reply, so I said calm down and take your time to type instead of spamming chat window !
 
@MuhammadRaja I never saw you in there, and people here know that i never spam
 
Error 0 occured, I will call the maid (@Zirak)
 
Dbz
7:47 PM
Hmm, it's not working for me...is this correct?
 
Dbz
$("#selectable").on("selectablecreate", function( event, ui ) {
	console.log("Chosen Cache is: " + localStorage["chosen_cache"]);
	$("#selectable li").get(localStorage["chosen_cache"]).addClass("ui-selecting");
});
 
I'm just quick as hell cause i drink many coffee
 
Dbz
console.log() never fires
 
hello guys need some help on javascript full screen
i hav this page of mine for u guys to actually see what problm im facing
 
7:49 PM
Are you still calling $('#selecttable').selectable()?
 
@SOChatBot Ssshhh, it's ok, I'm here now...
 
click the fullscreen button
and see what the problem is
 
0
Q: Moving a sprite towards a x and y co-ordinate

James DawsonGiven a sprite with an x and y co-ordinate, how would I move it towards another sprite with an x and y co-ordinate? I've already made it face towards the other sprite, and I've made it move towards the other sprite however because I'm using sin and cos it's circling the player and slowly moving ...

 
Dbz
@phenomnomnominal, you mean the function from before? No. I showed you everything I'm calling.
 
What is up sons
 
7:51 PM
anyone here familiar with the Flexgrid plugin?
 
$(document).ready(function(){
$("#searchbutton").click(function(){
var word = $("#searchbar").val();
if(word=="")
{
  return false;
}


});




});
O_O
 
its changing to fullscreen but evrythng is happening very slowly
 
y u no format
 
That is like the most legit code ever man, refactor that IF YOU CAN
 
return $("#searchbar").val().length > 0;
 
7:52 PM
Hi guys. I am a completely javascript newbie, and I am trying to make a really simple javascript example using ember.js. Can anyone take a look at jsfiddle.net/bjarkef/qx6b8 and tell me what I am doing wrong? Thanks :)
 
@rlemon hahaha you just blew my mind
$('#reportform')
	.bind("ajax:success", function(data, status, xhr) {
		$('#reportalert').text('Done.');
	});
	.bind("ajax:error", function(xhr, status, error) {

		$('#reportalert').text('Failed.');

	});
Does this work?
 
@BjarkeFreund-Hansen haha maybe you should learn javascript first....
 
How about return !!document.getElementById('searchbar').value.length ?
 
@XCritics Didja try it?
 
@SomeKittens Node.js?
 
7:53 PM
No, the code you just posted
 
@SomeKittens oh, yeah and it didn't work LOL
 
@twiz: Probably, but I really would like to do it in the context of ember :)
 
@Zirak shouldn;t it be like this

!!document.getElementById('searchbar').val.length
 
@MuhammadRaja Y U NO MAEK SENSE!? Could not understand document.getElementById('searchbar').val.length
 
Needs more bangs
 
7:54 PM
@MuhammadRaja You're thinking jQwerties
 
is the reportForm a real form?
 
@SomeKittens jQwerties :S
 
	<%= form_for(@report, html: { id: "reportform" }, remote: true, update:
	{ success: "response", failure: "error"} ) do |t| %>
<p id="reportalert"></p>
	<%= t.text_field  :plant_site,    placeholder: "Plant Site" %>

	<%= t.text_field  :route_number,  placeholder: "Route Number" %>

	<%= t.text_field  :driver_name,	  placeholder: "Driver name if available" %>

	<%= t.date_select :date_recorded, html: { class: "input-block-level" } %>

	<%= t.text_field  :action,        placeholder: "Action taken" %>
 
Dbz
I would think that the line $("#selectable li").get(localStorage["chosen_cache"]).addClass("ui-selecting"); would work on its own, but I get an error: "Uncaught TypeError: Cannot call method 'addClass' of undefined "
why is that?
 
dude.
give me rendered HTML
don't your ASP crap
 
Dbz
7:55 PM
Like, without waiting for an event, because the page would fire that function when the javascriot loads
 
@BjarkeFreund-Hansen also, what is the problem with it?
 
your browser gets HTML, I want to see the HTML
 
...this place is being scary.
 
@rlemon Therefore, you are a browser
 
@rlemon Well fine then
 
7:55 PM
@Dbz .get() returns nothing
 
@rlemon 	<form accept-charset="UTF-8" action="/reports" class="new_report" data-remote="true" id="reportform" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="u8VQusEn0IAyXxjdFYvDHFrtQ=" /></div>
<p id="reportalert"></p>
	<input id="report_plant_site" name="report[plant_site]" placeholder="Plant Site" size="30" type="text" />

	<input id="report_route_number" name="report[route_number]" placeholder="Route Number" size="30" type="text" />
Boom
 
I'm gonna watch The Breakfast Club. You're welcome to join me.
Not you
 
yeah, it would be interesting what localStorage["chosen_cache"] actually contains
 
Dbz
@rlemon, how to I add the class "ui-selecting" to a list element in the unordered list id "selectable"?
A very particular element
 
7:58 PM
Hello, how do I, using jQuery, access an element by its Javascript variable?
 
document.getElementById('selectable').children[index].classList.add('ui-selecting');
 
Dbz
@GNi33 localStorage["chosen_cache"] contains the index of the list I want to add the class "ui-selecting" to
 
@Hope4You there is no hope for you
 
jesus christ..... the questions in here today....
 
@twiz: See result window, name is not inserted from the controller, as I would expect.
 
7:58 PM
@Dbz but it's not finding the index.
so it's undefined
 
@rlemon I get a Uncaught SyntaxError: Unexpected token . in my js on the ajax:error line
 
figure out why it's not finding the index.
 
Trying to do this: $(THE VARIABLE).trigger('create');
 
@Dbz not sure if this works with get though
 
Dbz
Oh crap, that's the problem?
But it should be stored....Let me take a looksee
 
7:59 PM
try .eq() maybe? not sure right now
 
wtf why css room is always empty :/
 
@rlemon it's a genuine issue I tried searching couldn't find answer.
 
@BjarkeFreund-Hansen you mean {{title}}?
 
@Hope4You thank you ;)
 
@Hope4You this should work (call $().trigger on the jQuery object wrapping the element stored in THE VARIABLE)
 

« first day (879 days earlier)      last day (4062 days later) »