Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="">Open window in Modal Dialog</a>
- <div id="myContent">
- <h1>Look at me!</h1>
- <iframe src="http://www.google.com" />
- </div>
- <div class="jqmWindow" id="modalDialog">
- <iframe frameborder="0" id="jqmContent" src="">
- </iframe>
- </div>
- function showModal(url, height, width)
- {
- var dialog = $('#modalDialog')
- .jqm({
- onShow: function(h) {
- var $modal = $(h.w);
- var $modalContent = $("iframe", $modal);
- $modalContent.html('').attr('src', url);
- if (height > 0) $modal.height(height);
- if (width > 0) $modal.width(width);
- h.w.show();
- }
- }).jqmShow();
- }
- function closeModal(postback)
- {
- $('#modalDialog').jqmHide();
- }
- wrap.bind('dragstart', function() { overlay.show(); })
- .bind('dragstop', function() { overlay.hide(); })
- .bind('resizestart', function() { overlay.show(); })
- .bind('resizestop', function() { overlay.hide(); });
Add Comment
Please, Sign In to add comment