Results 1 to 3 of 3

Thread: iPhone Type Wheel Woes

  1. #1
    Join Date
    Feb 2013
    Thanked 1 Time in 1 Post

    Default iPhone Type Wheel Woes

    I have an iPhone type wheel for picking options. When I have no headings the wheel works well. However; when I add a header to the options, the wheel selection bar fails to line up on the option and the incorrect option is selected, it seems to start at one off, then two. Here is the page....

    This is the part of the javascript that I've been playing with.

    if ([0].options.length > 0) {
    				var header=""  // HERE
    				for(var i=0;i<[0].options.length;i++) {
    					var option =[0].options[i];
    					if($([0].options[i]).closest('optgroup').attr('label') && header!=$([0].options[i]).closest('optgroup').attr('label')){
    					//if(header!=$([0].options[i]).closest('optgroup').attr('label')){ // HERE
    						$('<li/>', {id: ulId+'_', value: "", text: $([0].options[i]).closest('optgroup').attr('label')}).appendTo('#'+ulId); // HERE
    						header=$([0].options[i]).closest('optgroup').attr('label'); // HERE
    $('#'+ulId+'_').css({'line-height': '37px'});
    //$('#'+ulId+'_'+option.value).css({'line-height': '37px'});
    						//$('#'+ulId+'_'+option.value).css({'line-height': '37px'});
    						//header=$([0].options[i]).closest('optgroup').attr('label'); // HERE
    					} // HERE
    					$('<li/>', {id: ulId+'_'+option.value, value: option.value, text: option.text}).appendTo('#'+ulId);
    						'height': '37px',
    						'line-height': '37px',
    						'text-align': 'center',
    						'display': 'block',
    						'padding': '0px',
    						'margin': '0px'

  2. #2
    Join Date
    Feb 2013
    Thanked 1 Time in 1 Post


    Problem Solved. How do you close a thread?

  3. #3
    Join Date
    Jan 2007
    Davenport, Iowa
    Thanked 98 Times in 96 Posts


    We can close it, but it would be better if you could post your solution so that others with a similar problem can see how you solved it. You can also edit the first post and then select "Go Advanced" and mark the post as resolved so that others know that you were able to find a satisfactory answer.
    To choose the lesser of two evils is still to choose evil. My personal site

Similar Threads

  1. Magnetic Scroll Mouse Wheel
    By davelf in forum Looking for such a script or service
    Replies: 4
    Last Post: 10-26-2014, 08:21 AM
  2. Replies: 2
    Last Post: 01-11-2012, 07:59 PM
  3. Resolved using the mouse wheel in Opera
    By james438 in forum JavaScript
    Replies: 9
    Last Post: 09-01-2011, 03:21 PM
  4. Scroll Wheel
    By hosdank in forum Flash
    Replies: 5
    Last Post: 09-06-2008, 07:32 PM
  5. JavaScript Mouse Wheel coding
    By shachi in forum JavaScript
    Replies: 35
    Last Post: 07-29-2006, 09:50 AM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts