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
$(function(){ | |
$('form').bind('expand',function(){ | |
if (this.id == 'phone') { | |
$('#phone h3 a').addClass('removeCorner'); | |
} else { | |
$('#phone h3 a').removeClass('removeCorner'); | |
} | |
}); | |
}); |
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
/* Smaller than standard 960 (devices and browsers) */ | |
@media only screen and (max-width: 959px) { } | |
/* Tablet Portrait size to standard 960 (devices and browsers) */ | |
@media only screen and (min-width: 768px) and (max-width: 959px) { } | |
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ | |
@media only screen and (min-width: 480px) and (max-width: 767px) { } | |
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ |
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
<link type="text/css" media="only screen and (max-device-width: 480px)" href="small.css" rel="stylesheet" /> |
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
<div data-role="page" id="swipemenu"> | |
<div data-role="header"> | |
<h1>jQuery Mobile - Swipe Menu</h1> | |
</div> | |
<div data-role="content"> | |
<ul data-role="listview" data-inset="true" > | |
<li data-role="list-divider">Swipe Menu</li> | |
<li> | |
<a href="/code/jquerymobile/page.html">Item One</a><br /> | |
<i>And sub text</i> |
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
if ( event.target.id.indexOf('swipemenu') >= 0) { | |
// remove any existing swipe areas | |
$('.divSwipe').remove(); | |
// add swipe event to the list item, removing it first (if it exists) | |
$('ul li').unbind('swiperight').bind('swiperight', function(e){ | |
// reference the just swiped list item | |
var $li = $(this); | |
// remove all swipe divs first | |
$('.divSwipe').remove(); | |
// create buttons and div container |
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
.divSwipe { | |
text-align: center; | |
position: absolute; | |
z-index: 5; | |
width: 100%; | |
min-height: 64px; | |
background: #dddddd; | |
display: none; | |
} | |
.aSwipeBtn { |
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
<div data-role="page" id="swipedelete"> | |
<div data-role="header"> | |
<h1>jQuery Mobile - Swipe to Delete</h1> | |
</div> | |
<div data-role="content"> | |
<ul data-role="listview" data-inset="true" > | |
<li data-role="list-divider">Swipe to Delete</li> | |
<li><a href="page.html">Item One</a></li> | |
<li><a href="page.html">Item Two</a></li> | |
<li><a href="page.html">Item Three</a></li> |
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
$(function(){ | |
$('div').live('pageshow',function(event,ui){ | |
if ( event.target.id.indexOf('swipedelete') >= 0) { | |
// remove any existing swipe areas | |
$('.aDeleteBtn').remove(); | |
// add swipe event to the list item | |
$('ul li').bind('swiperight', function(e){ | |
// reference the just swiped list item | |
var $li = $(this); | |
// remove all buttons first |
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
.aDeleteBtn { | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
float: right; | |
height: 15px; | |
line-height: 15px; | |
margin: 3px 10px 0 0; | |
padding: 0.6em; | |
position: absolute; | |
right: 0; |
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
<a href="page.html" data-role="button" data-theme="b" data-iconpos="right" data-icon="myapp-settings">Custom Icon</a> |