0

i am unable to change the color of the buttons/options ( Enter and More info) here is my javascript part of the code:

 <script type="text/javascript">
     $(document).on('pagebeforeshow', '#index', function(){    
    // Add a new select element 


     $('<select>').attr({'name':'select-choice-1','id':'select-choice-1','data-native-menu':'false'}).appendTo('[data-role="content"]');
     $('<select>').attr({'name':'select-choice-2','id':'select-choice-2','data-native-menu':'false'}).appendTo('[data-role="content"]');

    $('<option>').html('More info').appendTo('#select-choice-2');
    $('<option>').html('Enter').appendTo('#select-choice-1');
    $('<option>').attr({'value':'1'}).html('Instructions').appendTo('#select-choice-2');
    $('<option>').attr({'value':'2'}).html('Bookings').appendTo('#select-choice-2'); 
    $('<option>').attr({'value':'3'}).html('Newsletter').appendTo('#select-choice-2');     
    // Enhance new select element
    $('select').selectmenu();

    $(document).on('change', '#select-choice-2', function(){    
        alert($(this).find("option:selected").text());


    });    

});

Really appropriate the help.

Gabriele Petrioli
  • 191,379
  • 34
  • 261
  • 317
  • The javascript part has nothing to do with coloring. What is your problem, what is the relevant html/css and what have you tried ? – Gabriele Petrioli Jan 06 '16 at 00:34
  • i know. im trying to find out how to add color too these elements. and that suggestion you sent did not solve the problem . Thank you. – Student3434 Jan 06 '16 at 21:43
  • I didn't suggest that answer, the SO community did, but seeing it it seems relevant. It suggests to use CSS to style them. – Gabriele Petrioli Jan 06 '16 at 22:30

0 Answers0