last day (15 days later) » 

20:00
0
A: jquery writing one click statement for query.map set up instead of 3

ᾠῗᵲᄐᶌSo I'm assuming you want to do something when all data-answer=true have been clicked inside the div - You really don't need the array of true answers then as you can do a check on each click $('.answer').click(function(){ var $el = $(this); if($el.data('answer')){ // if data-answer=true ...

is there a reason you put a $ in front of the el variable?
just so I know that it's a jQuery object :)
so are you only doing stuff for the data-answers=true? or are you doing something for both true and false?
only for when they're true
so addback just keeps track of the previous clicks?
so if you look at this $el.siblings('[data-answer=true]').addBack().. i started at the current clicked element - I traversed to the siblings so now the collection only contains the siblings - I want to include the element I started out with($el) so .addBack() adds back the previous selected element.
hey
thanks for being so helpful
20:00
hello
it's great to be able to ask questions
np :) I started exactly where you are
yea I think some people forget that
didn't even know that much js.. learning jQuery taught me JS :P
yea i'm in teh same boat
i've been mostly learning jquery
not native JS
so little things here like
20:01
I just started last year.. feel really confident in the front end now :P
if($el.data('answer')){
wow that's awesome
you learned very fast
oops , actually that makes sense
it's mostly about learning how to debug.. always code with your developer tools open
also that will return true if data-answer=true
and false if data-answer=false
so for some reason this isn't quite working in my total program here
oh ok.. can you explain what is/isn't happening?
i'm goign to send it to you in a sec, seeing it will be easier
20:04
yeah it definitely will be :P
how did you pick all of this up so fast, do you mostly just code or do you do something like design too?
no just being on stackoverflow actually lol.. just started answer questions I knew - then tried some I didn't know and other people will tell you your wrong and the right way
also reading through jQuery's API
i rarely have to check the API since I memorize most of the methods.. though there are still some I've never seen beffore
sorry for some reason this is copying to the server very slowly. Yea I read the API sometimes I have trouble following it, and sytax stuff can be hard sometimes
okay
yeah it is.. the other important thing to know is how to access elements in arrays/objects
so in that, if you click on one of the people
it's the five answers sitting at teh bottom of each one
20:08
ah ok
they have their values, and when you click thorugh them, basically waht I'd like ot have happen is if you click it and it's true it gets a backgroudn color of that orange
and when you get all of the true ones
it does the alert
here's a little error
$el.closest('.answerss')
has an extra s
oh yup, now it works haha
hehe.. was just a little syntax error
haha yes!
yea i'm trying to write things in a way
so it's much less code rather then more
it's a bit of a jump though
20:11
Yeah.. with jQuery that should always be the goal.. do more with less :P
hey thanks so much for helping me and being so nice. question would you mind exchanging liek idk skype info, it's nice to be able to ask someone questions who actually has knowledge, if you were ever busy you could just say you were and that'd be totally fine. Also totally fine if you'd rather not, just wanted to ask!
i have a gmail.. no skype though.. it's [email protected]
on usually on it all day
you designed that page? looks pretty nice - something I would never be able to do
haha yea
i do design, illustration and trying ot code more
www.klossal.com
that's my website
my name is peter I'm going to add you to my gmail
people like you are rare in teh coding community
very nice :)
I'm just me :P Always willing to help when I can
thanks again, I just sent you an im in gmail
20:16
hmm.. didn't see anything
you did with 2 zeros?
i think so?
try messaging me

last day (15 days later) »