wrappedElement
wrappedElement
I need help resolving the following:
I want to apply some jquery codes to play around some images.
when i click i don't get the even images
same things with the odd ones when i make the changes
<script language="javascript">
$(function() {
$("#evenButton").click(function(){
$("img:even").addClass("wrappedElement");
$("#result").html("Show Even Images");
$("div").addClass("wrappedElement");
})
})
</script>
<div id="header">
<button id="testButton"> Test</button>
<button id="hideButton"> Hide All Images</button>
<button id="evenButton"> Show Even Images </button>
<div id="content">
<img src="foodpyramid.jpg" id="Food Pyramid" width="150" height="200" id="floatright" alt="Food Pyramid"/>
<img src="smartcube.jpg" id="Smart Cube" width="100" height=""200 id="floatleft" alt="Smart Cube"/>
<img src="mushroom.jpg" id="Mushroom" width="150" height="200" id="floatleft" alt="Mushroom"/>
<img src="fenway.jpg" id="Fenway" width="150" height="200" id="floatleft" alt="Fenway Park"/>
<img src="randomcrayons.jpg" id="" width="150" height="200" id="floatleft" alt="Random Crayons"/>
</div>
<img>
<div id="result"></div>
Thank you for replying
Naps..