Hi, there, I have got a website that fetches news-feeds from different new-sites and present it on one feed-sampler. Actually I do it with a php-script, the site is shown, when all feeds (or an error-message) are loaded. Now I want to relaunch it, showing the site at once and sending requests one after an other so that the users can see the first feeds almost at once. But I've got to jscripts, that did no work. One is the tooltipster.js that makes styled tooltips out of the delivered feedcontent and the second one ist the eqheight.coffee-script, that gives the same height to each of the articles in a row. Actually I include or load the jsscript-file with these two functions at the end of my php-site, but in my new site, I have to call the two functions when the first feeds are there. I tried to build-in the functions at another place of the script but it did not work. Because - to be honest - I don't know much about js. Here are the links to the sites. This is the site with the pure php-script:


This is the site with the js-feedloading, but with an old design without tooltipster and eqheight:


This is the site in which I tried to combine it:


And this is the Code od the new site:

  <div class="main"  style="margin: 60px 0px 10px 10px;">

  <script type="text/javascript">

//function that loads the feeds

var feedObj = null;
    feedObj = new XMLHttpRequest();
var i = 1;

window.onload = function() {

    function beginneLaden() {

        feedObj.open("GET", "feeds1.php?feedid="+i);   //"feeds1.php" is the file with the feed-urls and that loads the php-file that outputs the content
        feedObj.onreadystatechange = ladeFeeds;

        function ladeFeeds() {

            var fa = false;
            var anzahl = 18;      // Anzahl der Feeds angeben

            if (feedObj.readyState == 4) {
                document.getElementById("feed"+i).innerHTML += feedObj.responseText;
                fa = true;
                if (i > anzahl) {fa = false;
            if (fa != false) {

$(".main").eqHeight("article", {equalize_interval: 500});

  equalheight('.main article');


 Hier so viele Div-Bereiche im Dokument anlegen und mit einer ID versehen,
 wie Feeds in der Seite geladen werden sollen.

   <article id="feed1"> 
               <a href="http://www.tagesschau.de" target='_blank'> 
            <img src="../logos/tagesschau.jpg" alt="Tagesschau" class="img-rounded"/></a>          

  <article id="feed2"> 
  <a href="http://www.deutschlandfunk.de/nachrichten.353.de.html" target='_blank'> 

                       <img src="logos/dlf.jpg" alt="Deutschlandfunk" class="img-rounded"/></a>
  <article id="feed3"> 
  <a href="http://www.spiegel.de/" target='_blank'> 
  <img src="logos/spiegel.png" alt="Der Spiegel" class="img-rounded"/></a>

My questions: Where can and should I load the eqheight- and tooltip-function? can I call a jsscript within another jsfunction? How should I solve it all?

Kind regards