Computer Science random quotes machine - No JQuery

Here’s a link to my random quote machine generator: http://codepen.io/tgreenidge/full/VKydvA/

I used ajax but no jquery - trying to code stuff under the hood of jquery.

1 Like

Nice job on not using jQuery. I’m currently struggling with the Twitter button and I think I can solve it using jQuery but had wanted to only use javascript. Glad to see you managed.

1 Like

The main thing with buttons/elements and using JS only is that the ‘onclick =“someFunction()”’ property must be placed in the element like class=“className”. The “someFunction()” must be defined in your javascript file.

Going through the following tutorials may prove to be helpful:
http://www.w3schools.com/jsref/event_onclick.asp
http://www.w3schools.com/js/js_htmldom_events.asp

I tried to use JQuery at first for other things, but had issues since I defined someFunction() as part of the $( document ).ready(function() {}); You may have to define vanilla JS functions outside of it (I could be wrong).

To figure out what was required to post stuff to twitter, I googled the requirements, and put it as part of the function. Be sure to grab the message from the element in which it exists.

Thanks for the valuable feedback! I’m know my design/css skills need some work. I usually use the color palettes from Adobe: https://color.adobe.com/explore/newest/ , but I shall look into material design, since I am unfamiliar with the principles.

I see what you mean with the buttons too - thanks so much!

I see the difference in what you implemented already. I will try to implement in the projects I attempt within the next week. I will swing back to the previous projects I attempted on a later date, since I want to finish the front end certificate by end of next week. I’m using these projects as a brush up for a preparation for an interview I have on the 17th. Believe me, it’s in my best interest to implement material design before that interview - thanks for mentioning it.