• 1. How to make a specific dropdown menu item bold
    2.how to make specific dropdown menu non clickable
    please help me to solve this issue

Viewing 1 replies (of 1 total)
  • Hello @hashimtahir,

    Let’s say we have this dropdown field:

    [select your-options "Option 1" "Option 2" "Option 3"]

    You can bold a specific option from this dropdown using the field name and option value as a CSS selector:

    .your-options option[value="Option 2"] {
        font-weight: bold;
    }

    Now the option you pointed should look like this:
    Specific option bold in a dropdown menu

    If you want to disable a specific option, you must use some JavaScript code to achieve it. Let’s suppose that we want to deactivate option 3, you can do something this way:

    (function( $ ) {
      'use strict';
      $(document).ready( function(){
        var $option = $('option:contains("Option 3")');
        $option.attr('disabled',true);
      });
    })(jQuery)

    Now that specific option should not be clickable and look like this:
    Dropdown menu: Specific option bold and disabled

    Best regards,
    Yordan.

Viewing 1 replies (of 1 total)
  • The topic ‘make dropdown menu bold’ is closed to new replies.