0

I need to load all the html files into a single div using jquery.

$("#search_content").load('components/1.html','components/2.html','components/3.html');

But it loads the first file only. I need to load all the files from the components directory into search content div. And also i'm searching the string from this div. all content's are in 'p' tag. i need to find its occurance and its parent file. for example, if i search the string 'google'. i need to get it's 'p' tag accurance like 3 and its parent file 'components/2.html'.

var occurance = $('p').index(this);

But it returns only the total occurance. I need to get the filename and the occurance from that file only

Please help me. I struck in this for 2 days. Thanks in advance.

Jegan
  • 530
  • 7
  • 27

0 Answers0