Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div style="text-align:center; padding-top:50px;">
- <div id="doc" style="width:384px;height:512px;">
- <iframe id="docFrame" style="width: 100%; height: 100%;"
- src='http://www.ready.gov/america/_downloads/sampleplan.pdf'>
- </iframe></div></div>
- <div id="data"></div>
- <script type="text/javascript">
- $(document).ready(function() {
- var obj = $('#docFrame');
- $('#doc').resizable({handles:'all', resize: function(e, ui) {
- $('#data').html(ui.size.width + 'x' + ui.size.height);
- obj.attr({width: ui.size.width, height: ui.size.height});
- }});
- });
- </script>
- $(document).ready(function() {
- var obj = $('#docFrame');
- $('#doc').resizable(
- {
- handles: 'all',
- resize: function(e, ui) {
- $('#data').html(ui.size.width + 'x' + ui.size.height);
- obj.attr({ width: ui.size.width, height: ui.size.height });
- },
- start: function(e, ui) { $('#docFrame').hide(); },
- stop: function(e, ui) { $('#docFrame').show(); }
- });
- });
- <div style="text-align: center; padding-top: 50px;">
- <div id="doc" style="width: 384px; height: 512px; position: relative;">
- <div id="overlay" style="position: absolute; top: -5px; left: -5px;
- padding: 5px; width: 100%; height: 100%; background: red;
- opacity: 0.5; z-index: 1; display: none;"></div>
- <iframe id="docFrame" style="width: 100%; height: 100%; position: relative; z-index: 0;"
- src='http://www.ready.gov/america/_downloads/sampleplan.pdf'></iframe>
- </div>
- </div>
- <div id="data"></div>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js" type="text/javascript" charset="utf-8"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- var obj = $('#docFrame'), overlay = $('#overlay');
- $('#doc').resizable({
- handles: 'all',
- start: function() {
- overlay.show();
- },
- resize: function(e, ui) {
- $('#data').html(ui.size.width + 'x' + ui.size.height);
- obj.attr({
- width: ui.size.width,
- height: ui.size.height
- });
- },
- stop: function(e, ui) {
- overlay.hide();
- }
- });
- });
- </script>
Add Comment
Please, Sign In to add comment