0
<ul id='FileList'>
  <li>first</li>
  <li>Second</li>
  <li>Third</li>
  <li>Fourth</li>
  <li>Fifth</li>
</ul>

$("#FileList li").click(function() {
    alert($(this).text());
});

Inside modal popup, How can I alert the id of the li item clicked In normal HTML page, the above code works fine, but i could not able to get the value when the same div in modal popup

Thanks in advance Bharani

Bharanikumar
  • 25,457
  • 50
  • 131
  • 201

1 Answers1

2

Maybe you should try this way? :

$(document).on('click','#FileList li',function(){
    alert($(this).text());
});
Harsh Makani
  • 761
  • 5
  • 11