ich habe gerade begonnen, mich anhand von zwei Tutorials in jQuery einzuarbeiten und habe dabei dieses Übungsprogramm geschrieben:
- Code: Alles auswählen
<html>
<head>
<script type="text/javascript" src="jquery-1.7.js"></script>
<script type="text/javascript">
var ein;
jQuery.fn.pulsieren = function(){
if (ein ) $(this).delay(500)
.fadeOut("slow")
.fadeIn("slow", function () {$(this).pulsieren()});
};
$(document).ready(function(){
$("a").mouseover(function(){
$(this).test = "test";
ein = true;
$(this).pulsieren();
return false;
});
$("a").mouseout(function(){
alert ($(this).test);
ein = false;
return false;
});
return false;
});
</script>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>
Vielen Dank für nützliche Hinweise und viele Grüße - Ulrich