Random Quote Machine - Review and Help Please!

Random Quote Machine - Review and Help Please!
0

#1

Please review my project -

http://codepen.io/pankajashree/pen/XpzKvP?editors=0010

Also, for some reason, the border doesnt appear around my quotes. I have set css: border-color using jquery. Can anyone please tell me where I am going wrong?


#2

Give this a shot:

$(’.quotes’).css({“border-color”: randColor,
“border-width”:“2px”,
“border-style”:“solid”});


#3

Hey, thanks! I tried, it didnt work either. Wonder what’s happening. There’s no syntax error.


#4

If you’re wondering why the initial quote (the napoleon quote) doesn’t have a border, it’s because you draw the border when you click the “new quote” button. On load, you haven’t clicked yet. Randallfine’s solution should work for clicks of the button, but your codepen right now has white (no quotes) rather than randColor, and that won’t work since white is not a variable that’s been defined anywhere (change to 'white').


#5

Thanks a ton! It works indeed! :slight_smile: