What I'm looking to do is to utilize whatever native styling a particular mobile operating system uses for select menus/form elements but, have it opened by clicking on an image.
Any thoughts on how I might go about accomplishing this? Thanks in advance!
Working on creating my own plugin and realized that I would very likely end up doing this again in the future. Unfortunately, I have an extremely short memory when writing code. I frequently have to re-read the code I've created the day prior so I can get back on track with what I was doing. As such, I'm a fervent commenter in my code.
So, I'm creating a jQuery plugin framework with comments for everything that's going on in the framework to prevent my brain from having to re-learn everything in a month or so when I do another one.
What I would like help with from the community is for the plugin-savvy folks to take a look at this code and help me fill in the blanks and make corrections to those places where I'm way off base. As you'll likely notice rather quickly, this is taken from the jQuery plugin tooltip construct found here: http://docs.jquery.com/Plugins/Authoring
Thanks in advance for the help!
(function( $ ){
var methods = {
init : function( options ) { //default method called from the plugin
var defaults = {
// place default settings for plugin here
}
var options = $.extend(defaults, options); // combines any passed-in variables with the default variables and overwrites matching defaults
return this.each(function(){ // ensures chainability of the plugin
var $this = $(this),
data = $this.data('PLUGINNAME'); // ????
// If the plugin hasn't been initialized yet
if ( ! data ) { // ???? not sure how this can't be initialized as we just did this
/*
Do more setup stuff here
*/
}
});
},
destroy : function( ) { // called using $.PLUGINNAME('destroy')
Another developer and I are working on separate parts of a JQM/PhoneGap app for the iPad. In both the app and when testing locally in Chrome or other browsers we're seeing this bug:
When clicking on links that stay within the index.html page there are no problems. However, if from index.html you go to any other .html page (like productselector.html) and then to a subpage on index.html ( like index.html#gmap ) the "Home" button on those pages still takes you to the primary page but the header and footer are now broken. This is the code for the "Home" button within the #gmap page on index.html:
I'm creating a web form using jQuery Mobile. Before the user can submit the form, a selection must be made in a series of select drop downs.
When the page loads, all select boxes are disabled as is the search button. A getJSON call pulls in options for the first select box and it is then enabled. After the first selection is made, the second select box populates using another getJSON call and is enabled. Then the third and so on. Once all of the select boxes are chosen, the search button is enabled.
My issue is my search button. After I disable it, it looks disabled (grayed out) but, you can still click on and it activates the page transition to the searchResults page. What I would like is for it to do nothing until the last select box has been selected.
I have multiple tables with this similar structure:
<table>
<tr>
<th>Transaction Date</th>
<th>Description</th>
<th>Points</th>
</tr>
<tr>
<td>04/11/2011</td>
<td>New account bonus</td>
<td>100</td>
</tr>
<tr>
<td>04/11/2011</td>
<td>New account bonus</td>
<td>100</td>
</tr>
<tr>
<td>04/11/2011</td>
<td>New account bonus</td>
<td>100</td>
</tr>
</table>
I want to surround the central part of the table (not the th cells) with a border and have every other line starting with the first one below the table headers to be gray. Here are the styles I created
$(this).children("tr:has(td):even").addClass("tablegray"); //this isn't working
});
});
I'm trying to get it so that the top row under the header is gray. The above code isn't working and if I try this:
$("tr:has(td):even").addClass("tablegray");
instead of the table.each it obviously grabs ALL of the rows on the page which means that sometimes the top row isn't gray.
Additionally, how do I select the first table row with td's in each table to apply tabletop? And how to select the last row in each table? This doesn't work: