Javascript: counter on If Else in array loop not executing : <p>I want to show a line of text depending on what image is shown.  I did a console.log on the counter and it seems to loop fine as do the images, but I can't get the line of text to show depending on what number the counter is.</p>

<p>Fiddle: <a href="http://jsfiddle.net/jzhang172/RwjFX/7/" rel="nofollow">http://jsfiddle.net/jzhang172/RwjFX/7/</a></p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var imagesArray = ["http://vignette2.wikia.nocookie.net/pokemon/images/e/ef/025Pikachu_Pokemon_Mystery_Dungeon_Red_and_Blue_Rescue_Teams.png/revision/latest?cb=20150105233050",
"http://assets.pokemon.com/assets/cms2/img/pokedex/full//007.png",
"http://assets.pokemon.com/assets/cms2/img/pokedex/full/001.png",
"http://www.pokemonxy.com/_ui/img/_en/art/Fennekin-Pokemon-X-and-Y.jpg",
"http://www.pokemon20.com/assets/img/mythical/arceus/poke_arceus.png"];

function loopImages(count) {
var counter = count % imagesArray.length;
  $('img').attr('src', imagesArray[counter]);
  $('#firstStar').fadeIn(500, function(){
    $('#firstStar').delay(500).fadeOut(500, loopImages.bind(null, count + 1));        
  });
  console.log(counter);
if (counter=1){
$('#imageInfo').html('One');
}
else if (counter=2){
$('#imageInfo').html('Two');
}
}
loopImages(0);</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;img src="https://www.kingdomhearts.com/2_8/images/logos/kingdom_hearts_birth_by_sleep_logo.png" id="firstStar"&gt;
&lt;p id="imageInfo"&gt;

&lt;/p&gt;</code></pre>
</div>
</div>
</p>
