« first day (1725 days earlier)      last day (3223 days later) » 

11:00 PM
@Luggage you can, but only if they have a package.json. Napa lets you do it even if they don't have a package.json
 
ah, nice.
I hope I remember that next time I need it.
 
@Luggage is this the correct syntax for targeting all forms, submit action:
$('form').on('submit', function()
 
Why am I being pinged?
1. Make it valid JS first. 2. Test it yourself in jsfiddle.
 
it's jquery
 
That's no excuse to leave open parentheses.
 
11:05 PM
i just need the heading for the function checked
nothing more
 
Then read the docs
 
^
 
@Cereal it should work, but for some reason isn't getting called
 
Then why are you asking a completely unrelated question?!?
"My lawner mower doesn't work. Can you please explain why the sky is blue so I can fix my lawn mower"
 
how do i target all forms submit functionality is what I asked.
 
11:08 PM
reproduce the problem in jsfiddle.
(or your preferred site)
 
It's probably not being called because when you submit a form, it stops running javascript
look at preventDefault or something
 
you preventDefault from within the submit event.
In other words, your code DOES get a chance to run.
 
@rlemon the problem is that, when I'm listening on a disconnect, more of the same sockets can have the same ID, and that ID is suppose to be removed from an array. Making it so a channel can only contain one of each computer, instead of one of each session
 
yes, as default
 
11:11 PM
your error is in the console.
choose jquery in the dropdown at the top left.
 
i didn't set up the jquery load
 
@Luggage This is the guy that said "only bad programmers need stack traces"
I don't think he looks at the console lol
 
well the lack of jquery is YOUR ONLY PROBLEM
so.. might want to
 
yup.. works.
 
11:13 PM
do you think it's the interaction between functions?
 
Your event handler works. That is the correct way to listen for the submit event in jquery.
If you have a problem, I don't know what it is.
 
Yeah there's no problems with that fiddle
 
Why did I get an error?...
 
with the other js codes
it says object{}
Must mean there's an error somewhere in the document itself
time to line by line the debugging
 
@benlevywebdesign Read the error message
 
11:15 PM
@benlevywebdesign Permissions error
 
It literally says exactly how to fix your problem
 
yeah I am am the only user on my computer
 
@benlevywebdesign sudo
 
shouldn't need sudo for npm install -g on OSX
 
or run as an administrator if you're on windows
 
11:17 PM
true
 
ls -al /usr/local/lib/node_modules/
see who owns the files in there.
@benlevywebdesign try this to fix it:
sudo chown -R $(whoami):staff /usr/local/lib/node_modules
 
I think it worked
before @Luggage comment
 
it worked by using sudo?
 
I think so
 
ok.
 
11:24 PM
I hope
 
yea, it's fine. I thought I didn't need sudo on OSX, but using it won't harm anything.
 
Hah!
/chant sudo
 
in this case. i read. npm won't execute the scripts with root priveleges
i own my /usr/local and don't use sudo. I think that's the 'right way'.
 
as far as I know, yes
 
how do you get more meaningful output on browserify errors ?
 
11:39 PM
what would you guys check if return false; is broken?
 
return false; can't be broken
 
it can, I have it broken
 
uhhuh
 
@php_purest I'd stop writing code, because at that point I'd know it wasn't for me.
 
omg, you broke return? I need to use that tomorrow.
 
11:40 PM
front end isn't for me
@Luggage use it for what?
 
It's for me. Front end is fun.
Ohh you know.. return a little bit of this, a little bit of that.
 
how do i allow the kwicks function to run whilst also not going to the changed link ?
$('.hrefclassname').one("click", function() {
$('.kwicks').kwicks({
maxSize: '100%',
behavior: 'menu'
    });
    $(this).attr("href", "http://www.gooogle.org/");
return false;
});
 
or.. maybe i'll exit a function early.
The devious way I found that was to google "prevent link click".
 
so use
e.preventDefault();
if
return false;
is broken?
 
return false isnt broken
 
11:44 PM
nope neither work and a new question has been posted , goolge has expired but thanks for the input guys
 
wat
 
return false and e.preventDefault() both solve different (but related) issues with DOM events.
 
what is the jquery equivalent to return false;?
6
 
it's not about jquery, really. jquery just registers the event for you. the rules for events are the same w/ and w/out jquery
try preventDefault(). see if it helps.
 
11:47 PM
Well preventDefault stops the function kwicks from working and return false doesn't work either
 
shouldn't. show me the code.
and format it this time (ctrl-k)
 
Heads up: we’ll be swapping the #stackoverflow redis nodes around for network and firmware updates here in a bit. It should be transparent.
 
a buddy of mine is at the meetup, ttfn
 
not well. it's also missing some
 
$('.hrefclassname').one("click", function() {

$('.kwicks').kwicks({
maxSize: '100%',
behavior: 'menu'
    });
       e.preventDefault();
    $(this).attr("href", "http://www.hcpc.org/");
});
 
11:48 PM
you aren't calling preventDefault.
you can edit your message, no need to duplicate
 
ohh, there it is.. i didn't see it with the odd indentation
 
again , sorry my formatting is unattended until final draft
 
we.. you never get the event argument. that e doesn't come from thin air, it's passed into the envent handler
formatting helps you see structure of code. Code that's hard to read is that much harder to debug
 
understood , i will learn from my errors
 
11:52 PM
good formatting makes mistakes more transparent
it shouldn't be an afterthought.
 
a beforethought
a prethought
 
@BenjaminGruenbaum Nice
 
    $(this).attr("href", "http://www.hcpc.org/");
why not just
this.href = ...
 
anyway, your click event function gets an argument. fix that.
 
^ needs moar jqlite.
 
11:54 PM
@BenjaminGruenbaum You don't even need asynchronicity (since all messages arrive from synchronous read from a queue). Also no events. Just coroutines
 
ok click event sorted ripped out preventDefault so all works but just need to not go straight to the changed href until another click
$('.hrefclass').click(function() {
    $(this).attr("href", "http://www.hcpc.org/");
$('.kwicks').kwicks({
maxSize: '100%',
behavior: 'menu'
    });

});
 
(cc @Zirak)
 
well. you took out the thing that'll stop that link from getting followed.
 
yes the preventDefault(0;
();
it was stopping everything actually :)
 
yea, and i told you why that was
you never defined e
 
11:58 PM
yeah i put that in as well earlier , didn't work
e.preventDefault(e);
 
I know of no such way to way this without giving you code
$('.hrefclass').click(function(e) {
 
Ever consider learning javascript before coming for help?
 
Don't be rude
 

« first day (1725 days earlier)      last day (3223 days later) »