ryanSmithART.com/courses/365/2014


- week 9 -
Ask about homework - "Project C"



a little more javascript?

LINK TO OPEN WEBSITE IN CUSTOM SIZE WINDOW

<a href= "javascript:void(0)"onclick="window.open('http://ryansmithart.com/','linkname',
'height=500, width=700,scrollbars=no')" > TEXT</a>



// Here's the code:

<button onclick="myFunction()">Try it</button>
<script>
function myFunction(){
alert("I am an alert box!");
}
</script>

Fun Stuff:
BG Color: Green Yellow Red Brown White
<a href=""onmouseover="document.bgColor='green'">Green</a>


Let's download some jQuery


Add a link:

<script src=" jquery-1.11.0.js">
/* jquery version 1.11.0 */
</script>

here's the code ( for jquery-1.7.1 )

More with jQuery, ".slideToggle"



Put this code in the <head>of your html:

<script src=" jquery-1.11.0.js" type="text/javascript" charset="utf-8">
/* jquery version 1.11.0 */
</script>

Save this code as " jquery-1.11.0.js", and put it in the same directory as your html page:

jQuery




<script type="text/javascript">
$(document).ready(function(){
$("#slideDiv").hide();
$("#slideDiv2").hide();

$(window).load(function(){

$("#toggle").click(function(){
$("#slideDiv").slideToggle(500);
});
$("#toggle2").click(function(){
$("#slideDiv2").slideToggle(500);
});

});
});
</script>
<div id="toggle">
<a href="#toggle">Click</a>
</div>
<div id="slideDiv">
</div>
<div id="toggle2">
</div>
<div id="slideDiv2">
</div>

Example: fractalcatmusic.com





Some work time?






HOME WORK


keep working on "Project C"