-
-
Save ebello/593837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dynamically generated by ASP.NET for the language passed in. | |
var labels = { | |
objectOverlay: { | |
closeX: 'Close X', | |
fallback: 'Video for {vid}' | |
}, | |
global: { | |
label1: 'label1', | |
label2: 'label2' | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// used for links to objects like video. This will overlay the video on the screen. Requires jqModal.js. | |
$.fn.objectOverlay = function(options) { | |
var o = $.extend({}, $.fn.objectOverlay.defaults, options); | |
var g = labels.objectOverlay; | |
return this.each(function(){ | |
var $this = $(this); | |
$this.bind("click", function(e) { | |
e.preventDefault(); | |
var vid = $this.attr("href"); | |
o.objHTML = o.objHTML.replace("{closeLabel}", g.closeX) | |
.replace("{width}", o.width) | |
.replace("{height}", o.height) | |
.replace("fallbackLabel", g.fallback) | |
.replace("{vid}", vid); | |
$(o.objHTML).appendTo("body").jqm({onHide: function(hash) { | |
hash.w.remove(); | |
hash.o.remove(); | |
if ($.browser.msie) | |
document.location = document.location; | |
}}).jqmShow(); | |
}); | |
}); | |
}; | |
$.fn.objectOverlay.defaults = { | |
width: '640', | |
height: '480', | |
objHTML: '<div class=\"jqmWindow\">' + | |
'<a id=\"object-close\" class=\"jqmClose\" href=\"javascript:void(0);\">{closeLabel}</a>' + | |
'<object id=\"vid\" width=\"{width}\" height=\"{height}\" data=\"{vid}\">' + | |
'<param name=\"src\" value=\"{vid}\"/>' + | |
'<p>{fallbackLabel}</p>' + | |
'</object></div>' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment