I would like to add a simple if statement to my scaling function, to check for the class ".pic"
but it doesn't seem to work (it does work fine if I remove the if statement part, but then every element on the page scales when clicked)
$(document).ready(function(){
$(this).click(function(event){
var myTarget = event.target;
if (myTarget.is('.pic') {
$(myTarget).animate({
width: "75%"
}, 650 );
}
});
});
edit: since I'm still stuck on this one, after the answer below, here is a bit of the html, maybe this is the problem?
<div class=myImages id=group001>
<img class=pic id=img001 src="../images/img001.jpg">
<div class=text id=des001>
mobile sequence
</div>
</div>