-1

I am doing an application where I want to grab the content of div,which is inside a div.In my application I want to grab the content of <li></li>,which is inside <ul class="snippet-list"></ul>.The ul class is inside <div data-analyticsid="related"></div>.Is there any regular expression like preg_match to grab the data.

Thanks in advance...

Balu
  • 607
  • 3
  • 11
  • 24

1 Answers1

2

Try this :

<script type="text/javascript">

$(document).ready(function() {

   $("ul.snippet-list li").each(function() {
       var html = jQuery(this).html();
   });

});

</script>
GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
Ravinder Singh
  • 3,113
  • 6
  • 30
  • 46