Sie betrachten eine alte Version der Seite. Zur neuesten Version gehen.
$( '.additional' ).each(function() {
var $elem = $(this); var $toggle = $('<a href="#">mehr</a>'); $toggle.on( 'click', function( e ) {
debugger;
$elem.toogleClasstoggleClass( 'show' ); e.defaultPrevented = true; }); $toggle.insertBefore( $elem );
});
$( '.additional' ).each(function() { var $elem = $(this); var $toggle = $('<a href="#">mehr</a>'); $toggle.on( 'click', function( e ) { debugger; $elem.toogleClass $elem.toggleClass( 'show' ); e.defaultPrevented = true; }); $toggle.insertBefore( $elem ); });
Zeile 3: | Zeile 3: | ||
var $toggle = $('<a href="#">mehr</a>'); | var $toggle = $('<a href="#">mehr</a>'); | ||
$toggle.on( 'click', function( e ) { | $toggle.on( 'click', function( e ) { | ||
− | + | $elem.toggleClass( 'show' ); | |
− | $elem. | ||
e.defaultPrevented = true; | e.defaultPrevented = true; | ||
}); | }); | ||
$toggle.insertBefore( $elem ); | $toggle.insertBefore( $elem ); | ||
}); | }); |