Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Brett Guillory
@kurzninja
it depends on the context
in an HTML tag, those would be attributes
in CSS, some of those are considered selectors
Salman Shahid
@salman-shahid
Ok, I'm trying to add an attribute to an element by id using jQuery. Here's what I've got so far:
      var elemID = ($(".ops:nth-child(" + (childCount - 1) + ")").prop('id'));
      $("#" + elemID).prop("OnClick", elemID + "Press()");
elemID works and returns ac
It should evalute out to:
$(#ac).prop("OnClick", "ac" + "Press()");
but the OnClick="acPress()" attribute is never added to the element.
faintlywonky
@faintlywonky
Hello fellow coders. I just got to the Basic Front End Development section but when I follow the instructions for signing up for CodePen, I do not get a "Use info from GitHub" button. Can I go ahead without it, or will it cause me trouble later?
Salman Shahid
@salman-shahid
It shouldn't cause a problem @faintlywonky
Brett Guillory
@kurzninja
@mynameissal try .attr() instead of .prop
faintlywonky
@faintlywonky
@mynameissal ok, thanks, I'll try it.
CamperBot
@camperbot
faintlywonky sends brownie points to @mynameissal :sparkles: :thumbsup: :sparkles:
:star: 286 | @mynameissal | http://www.freecodecamp.com/mynameissal
Brett Guillory
@kurzninja
since it's a jQuery object, why don't you just add it as an event listener instead of adding it in the HTML?
Andrew Charlebois
@andrewchar
hey campers.
Brett Guillory
@kurzninja
@mynameissal
mutantspore @mutantspore hides
Salman Shahid
@salman-shahid
ahh I see..
Andrew Charlebois
@andrewchar
im just finishing up the quotes zip line and wanted to show it off a bit. lemme know what you think.
http://codepen.io/andrewchar/pen/BjqXJV?editors=0010
Salman Shahid
@salman-shahid
@andrewchar Nice work, you've progress a lot from yesturday!
Brett Guillory
@kurzninja
That looks great @andrewchar
Bruce Young
@mutantspore
@andrewchar the tweet button?
Andrew Charlebois
@andrewchar
@mutantspore yeah about that
Bruce Young
@mutantspore
lol ….
Andrew Charlebois
@andrewchar
i got frustrated and gave up
Salman Shahid
@salman-shahid
I'm pretty sure I butchered it lol..
Andrew Charlebois
@andrewchar
i honestly tried reading forums and went to the tweet intents and was reading that for a long time, tried many times and yeah.... wasnt getting it
Salman Shahid
@salman-shahid
If you want I can try explaining my method to you again.
Brett Guillory
@kurzninja
yeah, I found Twitter's API less than easy to understand...
Andrew Charlebois
@andrewchar
@kurzninja yeah i got really frustrated trying to read through twitters stuff
@mynameissal its okay i will leave it at that until later and come back to it once i have a better understanding
ive got a book to read about JS hopefully it will help me
Salman Shahid
@salman-shahid
I didn't use any APIs if that helps :D
DebugginOut
@DebugginOut
I'm having problems populating a link with a value
Salman Shahid
@salman-shahid
Using js @DebugginOut ?
DebugginOut
@DebugginOut
a = document.getElementById(...);
a.setAttribute("href", "somelink url");
yeah
This message was deleted
var b = document.getElementById('#link1');
b.setAttribute("href", "http://www.google.com");

</script>
<a id="link1">this is a link</a>
Andrew Charlebois
@andrewchar
@mynameissal but hey, i can now put my first project in my portfolio! :P
DebugginOut
@DebugginOut
but they aren't working
Salman Shahid
@salman-shahid
You can do a.href(url here;
Basically, you can open up a "tweet" page with a link and add text to the link so the text is passed to the "tweet" page.
E.g. for my one: "https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=" + QUOTE
So, you can use that as a link ref for a button..
Andrew Charlebois
@andrewchar
@mutantspore this morning while i was trying to do the twitter thing i was like omg where is mutant haha
DebugginOut
@DebugginOut
yeah tried that too
<script>
var b = document.getElementById('#link'); 
b.href = "http://www.google.com";
</script>
<a id="link">this is a link</a>
just makes blue text, but can't click it, and doesn't have href value
Salman Shahid
@salman-shahid
sec
Joseph Morse
@jnmorse
I had put this together to sort show how I did mine without including the rest of the code for the quote project http://codepen.io/jnmorse/pen/eJjYrO