Loading an iframe
How do I make an loading an iframe?
Load an iframe and size the page accordingly.. What is a loading an iframe? How do you make a loading an iframe? This script and codes were developed by Jared Pearce on 14 January 2023, Saturday.
Loading an iframe - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Loading an iframe</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid"> <div class="col-xs-12"> <div id="error"></div> </div> <div class="col-xs-12 col-sm-3"> <!-- Nav tabs --> <ul class="nav nav-list"> <li class="selected"><a href="#item1" data-iframe-source="https://codepen.io/jaredpearce/full/FbdDI">Item 1</a></li> <li><a href="#item2" data-iframe-source="https://codepen.io/jaredpearce/full/zIfra">Item 2</a></li> <li><a href="#item3" data-iframe-source="https://codepen.io/jaredpearce/full/iBdxb">Item 3</a></li> </ul> </div> <div class="col-xs-12 col-sm-9"> <!-- Tab panes --> <div class="panel panel-default" id="item1_iframe_holder"> <iframe id="item1_iframe" src="" align="center" width="100%" height="900"></iframe> </div> <div class="panel panel-default" id="item2_iframe_holder"> <iframe id="item2_iframe" src="" align="center" width="100%" height="900"></iframe> </div> <div class="panel panel-default" id="item3_iframe_holder"> <iframe id="item3_iframe" src="" align="center"></iframe> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Loading an iframe - Script Codes CSS Codes
iframe { width: 100%; min-height: 900px; border: 0; display: none; }
.selected { background: #f4f4f4; }
Loading an iframe - Script Codes JS Codes
$('li a').on('click', function(e) { e.preventDefault(); var iframe_url = $(this).attr('data-iframe-source'), iframe_name = $(this).attr('href') + '_iframe', iframe_height = 900; $('li').removeAttr('class'); $('iframe').removeAttr('style'); $(iframe_name).attr('src', iframe_url); $(iframe_name).css({ height: iframe_height, display: 'block' }); $(this).parent('li').attr('class', 'selected');
})
Developer | Jared Pearce |
Username | jaredpearce |
Uploaded | January 14, 2023 |
Rating | 3 |
Size | 2,180 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Bootstrap Tabs | 2,750 Kb |
SVG Container | 1,670 Kb |
Dojo Training | 2,079 Kb |
Border-image Investigation | 2,762 Kb |
Columns | 1,809 Kb |
My Truck | 2,257 Kb |
Floats | 3,111 Kb |
CSS Background Gradient | 1,524 Kb |
Interactive Process Chart | 4,719 Kb |
Ag-grid styling | 13,547 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Lunar eclipse | Ademilter | 2,056 Kb |
SVG Circle Progress | JMChristensen | 3,368 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
Chuck Norris Background | Manz | 1,967 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 Kb |
Flying Bee | Pwsm50 | 3,711 Kb |
CSSOff 2013 Submission | Codewunder | 14,766 Kb |
Image grid with captions | Mchernin34 | 2,222 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!