| FAQ |
| Kalender |
|
|
#1 | ||
|
|||
|
Medlem
|
Hej!
Jag håller på att försöka lära mig event binding från följande sida: http://docs.jquery.com/Tutorials:AJAX_and_Events Jag skulle vilja att ni scrollade ned till Scoping an Event Binding Function och följande kodsnutt: Kod:
$(document).ready(function() {
var bindBehaviors = function(scope) {
$('h3', scope).click(function() {
$(this).toggleClass('highlighted');
});
}
bindBehaviors(this);
$('#letter-a .button').click(function() {
$('#dictionary').hide().load('a.html', function() {
bindBehaviors(this);
$(this).fadeIn();
});
});
});
Kod:
<div class="wrapper"> <p class="p1"></p> </div> Min andra fråga gäller: Kod:
$('h3', scope).click(function() {
|
||
|
|
Svara med citat
|
|
|