title: Can I put a src attribute in an i or span tag?
body: <p>On my website in my footer I have a bunch of font awesome icons that lead to my profiles on different social media site. I have also created a modal on my webpage that when you click on an image it basically focuses in on it. So my idea was users can click on the Snapchat icon and my Snapcode would pop up so that users can get it. Unlike normal social media, Snapchat does not use URL links in order to find a user profile. Below is the line of code I have written I will also leave a link to my site so that you can see the problem I am having.</p>
  
  <pre><code>&lt;i class="fa fa-snapchat w3-hover-text-yellow" src="apps/images/snapchat.png" onclick="onClick(this);" class="w3-hover-opacity"&gt;&lt;/i&gt;
  </code></pre>
  
  <p>My question is, Is it possible to do something like this? I can get my function to work properly I just can't figure out how to hide the image so that it is only visible when the user clicks on the link.</p>
  
  <p>I have also tried something like this with still no avail. The toggleFunction() just changes the class name from w3-hide to w3-show and works fine with other elements.</p>
  
  <pre><code>&lt;i class="fa fa-snapchat w3-hover-text-yellow"&gt;
  &lt;img src="apps/images/snapchat.png" class="w3-hide" style="width:100%" onclick="toggleFunction();onClick(this);" class="w3-hover-opacity" alt=""&gt;
  &lt;/i&gt;
  </code></pre>
  
  <p>If anyone could help me out it would be greatly appreciated. The problem gives me an undefined error whenever you click on the Snapchat icon.</p>
  
  <p>Here is a link to the page. It is in the footer. Snapchat icon.</p>
  
  <p><a href="http://nerdislander.com/" rel="nofollow noreferrer">Nerdislander.com</a></p>