Playing with styles AND using "this":
Write a function named changebg that has ONE input parameter -- the color you want to change to.
Call it off the button, passing in the value from the box.
Write a function called emailcheck that has ONE input parameter -- the email domain the user provided.
In the function, set up a msg variable with a default message, and then output the message through an alert... like:
let msg = "hello person from " + domain alert(msg)
Then between those two lines (the msg set up and the alert) write some conditional clauses that changes the message if they provided a specific domain such as usc.edu or ucla.edu or google.com....
Call the function off the textbox, on
change
, and pass in this.value to the function.
Email Domain:
Using Javascript, write an event for mouseover bind off "a" that changes the font-size and color of the link. Use the "this" object.
Then also in Javascript bind mouseout for the same link that sets the font-size and color back to "normal".
Then using jQuery target ALL links and write two bind routines that use "this" to make the same css changes.
Is there a way we couuld have "stored" the original size and color for later re-use? Perhaps in a global variable?
News Links:
L.A. Times
N.Y. Times
Slate
Cnet