Skip to content

Instantly share code, notes, and snippets.

@poonkave
poonkave / jqm_dialog_close_right
Created December 4, 2012 09:20
jqm dialog close icon aligned right
$(document).on("mobileinit", function () {
$(document).on('pagebeforeshow', 'div:jqmData(role=dialog)', [], function (e, ui) {
$.mobile.activePage.find(".ui-btn-left").removeClass("ui-btn-left").addClass("ui-btn-right");
});
});
@poonkave
poonkave / jqm_popup_vimeo_video2
Created November 30, 2012 11:02
jQueryMobile popup Vimeo Video -1
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
$(document).on("pageinit", function () {
$("#popupVideo").on({
popupbeforeposition: function () {
@poonkave
poonkave / jqm_popup_vimeo_video
Created November 30, 2012 09:59
jQueryMobile popup Vimeo Video
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://a.vimeocdn.com/js/froogaloop2.min.js?1b636-1354269188"></script>
<script>
$(document).on("pageinit", function () {
$("#popupVideo iframe")
@poonkave
poonkave / runtimePopup.js
Created November 16, 2012 15:37
runtimePopup
function runtimePopup(message, popupafterclose) {
var template = "<div data-role='popup' class='ui-content messagePopup' style='max-width:280px'>"
+ "<a href='#' data-role='button' data-theme='g' data-icon='delete' data-iconpos='notext' "
+ " class='ui-btn-right closePopup'>Close</a> <span> "
+ message + " </span> </div>";
popupafterclose = popupafterclose ? popupafterclose : function () {};
$.mobile.activePage.append(template).trigger("create");