Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Commonmark migration
Source Link

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

added 342 characters in body
Source Link
tomsseisums
  • 13.5k
  • 20
  • 89
  • 150

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

Because the link (.brs2) isn't in DOM when the page is loaded. You have to live(); bind the click event.

$('.brs2').live('click', function(){
 alert('test');
});

You could as well use delegate();, but that's an overkill for such a simple task and a bit more complicated.

###Update

If I understood the question correctly, you can bind multiple events on live or you can delegate them. Please see the post here - Using jQuery .live with toggle event - it should give you the information you're looking for. I can provide the answer only tomorrow, it's late here.

Source Link
tomsseisums
  • 13.5k
  • 20
  • 89
  • 150
Loading
lang-js

AltStyle によって変換されたページ (->オリジナル) /