JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<div id="netywork-toggle">
<img id ="toggle-onoff-network" src="img1_on.png" width="auto" height="34"/>
</div>
<div id="share-stuff"> <!-- social share buttons -->
<ul class="crafty-social-buttons-list">
<li><a href="#" target="_blank"><img title="Pulseframe Code" alt="Facebook" width="38" height="38" src="facebook.png"></a></li>
<li><a href="#" target="_blank"><img title="Pulseframe Geek" alt="twitter" width="38" height="38" src="facebook.png"></a></li>
<li><a href="#" target="_blank"><img title="Comming Soon" alt="Comming Soon" width="38" height="38" src="facebook.png"></a></li>
<li><a href="#" target="_blank"><img title="Comming Soon" alt="Comming Soon" width="38" height="38" src="facebook.png"></a></li>
</ul>
</div>
CSS
#netywork-toggle {
background: #000;
padding: 5px;
}
JavaScript
// Change toggle when clicked
$('#toggle-onoff-network').on({
'click': function () {
var origsrc = $(this).attr('src');
var src = '';
if (origsrc == 'img1_on.png') src = 'img2_on.png';
if (origsrc == 'img2_on.png') src = 'img1_on.png';
$(this).attr('src', src);
}
});
// The script
$( "#netywork-toggle" ).click(function() {
$( "#share-stuff" ).slideToggle( "slow", function() {
// Animation complete.
});
});