![]() |
|< 1 2 3 >| | ![]() |
21 Einträge, 3 Seiten |
Struppi+2008-01-05 11:01:58--wobei ich es seltsam finde eine ID umzubennen
1
2
3
4
5
6
<h2>Vereinsmitglied: Max Schuster</h2>
<ul>
<li id="cancel"><a href="#">Mitgliedschaft kündigen</a></li>
<li id="stop"><a href="#">Mitgliedschaft stoppen</a></li>
<li id="close"><a href="#">Mitgliedschaft sperren</a></li>
</ul>
1
2
3
4
5
6
7
8
9
$("stop a").click(function() {
var parent_id = this.parentNode.id;
$('#'+parent_id).html('<a href="#">Mitgliedschaft fortsetzen</a>');
});
$("start a").click(function() {
var parent_id = this.parentNode.id;
$('#'+parent_id).html('<a href="#">Mitgliedschaft stoppen</a>');
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html>
<title>Hi</title>
<head>
<script src="/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery().ready(function() {
$("#irgendwas a").click(function() {
$("#irgendwas").html('<a href="#" id="test">Hier klicken um alert() zu erzeugen</a>');
});
$("#test").click(function() {
alert("hi");
});
});
</script>
</head>
<body>
<div id="irgendwas"><a href="#">Hier klicken</a></div>
</body>
</html>
<a href="#" onClick="irgendwas('stop', 'Kunde-29382');">Mitgliedschaft stoppen</a>
<a href="#" id="stop" class="Kunde-29382">Mitgliedschaft stoppen</a>
1
2
3
4
5
6
<a href="#" class="parameter1 parameter2">Link</a>
...
var attribute = $("a").attr('class');
parameters = attribute.split(' ');
1
2
3
4
5
6
7
8
9
10
11
12
<script type="text/javascript">
jQuery().ready(function() {
$("#irgendwas a").click(function() {
$("#irgendwas").html('<a href="#" id="test">Hier klicken um alert() zu erzeugen</a>');
this.id = 'was du willst';
});
$("#irgendwas a").click(function() {
alert("hi");
});
});
$(this).attr('href')
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<title>Test</title>
<head>
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/jquery.getUrlParam.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery().ready(function() {
$("#irgendwas a").click(function() {
var test = $(this).getUrlParam('vorname');
alert(test);
return false;
});
});
</script>
</head>
<body>
<div id="irgendwas"><a href="test.pl?vorname=max&nachname=mustermann">Hier klicken</a></div>
</body>
</html>
strHref has no properties
![]() |
|< 1 2 3 >| | ![]() |
21 Einträge, 3 Seiten |