-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
  • 597
  • 3
  • 10
  • 23

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,134
  • 11
  • 55
  • 76
Ravinder Singh
  • 3,092
  • 6
  • 27
  • 46