JSFiddle - React, Tailwind, and code Playground
by suhailvs
HTML
<link rel="stylesheet" href="http://bootboxjs.com/deps/bootstrap-2.2.2/css/bootstrap.min.css">
<script src="http://bootboxjs.com/deps/bootstrap-2.2.2/js/bootstrap.min.js"></script>
<div class="container">
<!-- sample modal content ###################################################-->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">ItechTalents News</h3>
</div>
<div class="modal-body">
<h4 id="feedtitle"><a id="feedurl"></a></h4>
<p><small id="feedpublished"></small>
</p>
<img id='img-in-modal'>
<hr>
<p id="feeddescription"></p><a id="feedmore"> (Click to read more..)</a>
</div>
<div class="modal-footer">
<button class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
<!-- /sample modal content -->
<a data-imgurl="http://cdn0.sbnation.com/entry_photo_images/8588609/tumblriphoneapp1_2040_large.jpg" data-headline="Tumblr tells iOS users to download security update, change their passwords" data-description="Users of Tumblr’s iOS app are advised to immediately install a new security update and change their passwords, says the company , following the discovery of a security vulnerability. (Passwords could be " sniffed " — intercepted on local networks — in some versions of the app.) A representative told The Verge that "earlier today, Tumblr was notified of a security vulnerability introduced in our iOS app, " and immediately acted to close it and notify affected users. iOS 7 will bring automatic app updating to Apple’s platform, getting rid of the need to plead with people to install security updates once it arrives this fall. In the meantime, be sure to download version 3.4.1 of Tumblr from the App...
JavaScript
$('.img-modal').click(function(event) {
var imgurl = $(this).data('imgurl');
var headline = $(this).data('headline');
var desc = $(this).data('description');
var pub = $(this).data('published');
var url = $(this).data('url');
$("#img-in-modal").attr("src",imgurl);
//$("#feedtitle").text('<a href='+url+'>'+headline+'</a>');
$("#feedurl").attr("href",url);
$("#feedurl").text(headline);
$("#feedpublished").text(pub);
$("#feeddescription").text(desc);
$("#feedmore").attr("href",url);
$('#myModal').modal('show');
});