Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

How to disable opening of dropdown in select box in jQuery Mobile

Note: Here is the working DEMO

HTML Part:

<div data-role="fieldcontain">
    <select name="select-choice-1"
        <option value="standard">Standard: 7
        <option value="rush">Rush: 3
        <option value="express">Express:
next day</option>

JS Part:

$("#disable_select").click(function() {

Right now I have added a button to disable the dropdown on click of that button, you can add your condition to disable it.

Categories : Javascript

Related to : How to disable opening of dropdown in select box in jQuery Mobile
How to disable last 2 inputs select (jquery)?
You could use .prevUntil(): $('input[type=checkbox]').on('change', function(){ $(this).prevUntil('input').prop('disabled', this.checked); }); <script src=""></script> <select name="select1" ><option>1</option></select> <select name="select1" ><option>2</option></select&g

Categories : Jquery
Disable dropdown item based on selection done on other dropdown box
OK this is an updated answer $('#select1,#select2,#select3').on('change', function(){ var value =$.trim($(this).val()); $('select option:contains("'+value+'")').attr('disabled','disabled'); }); New DEMO it will work for just Games So change your option value same of option text like so <option value="Games"> Games</option>

Categories : Javascript
Disable Select Option from another Select Option using Jquery
try this <table> <tbody> <tr> <td> <select name="type" class="firstType"> <option value="1">A</option> <option value="2">B</option> <option value="3">C</option> </select> </td> <td> <select name="item" class="firstItem">

Categories : Javascript
How to disable img link only on mobile, allow in web?
This should get the work done: <script type="text/javascript"> // get window width var width = $(window).width(); // check if window width is smaller then 1024px (mobile or tablet if(width < 1024) { // if yes then ... $(" a").click(function(e) { // this should prevent the clicking functionality e.preventDefault(); // just to add some

Categories : Jquery
Disable other options in a dropdown, if clicked on the first option
Try var $searchRegion = $('#searchRegion').change(function() { var isAll = $searchRegion.find('[value="all"]').is(':selected'); if (isAll) { $searchRegion.val('all'); } $searchRegion.find('option').not('[value="all"]').prop('disabled', isAll); }) <script src=""></script> <select id="searchRegion" name="s

Categories : Javascript
Recently Add
Busy Indicator while page is loading
parent.document.getElementById and images path
Can not get bootstrap datetime picker to display properly
reading select box jquery issues
DC.JS Pie Chart + Select Deslect from external JavaScript function
Why would I ever need to cancelAnimationFrame()
Angular.ui alert doesn't close
HTML/JS How to position a rectangle relative to 'any' side of the parent canvas element
parse variable to xml
C# Dictionary equivalent in JavaScript
ExtJS Dashboard Panel Fit Panel Vertically
jQuery cross domain ajax call - Interpreted as script but transferred with MIME type text/xml
Reactjs map returns unexpected token }
Working with multiple pages in apache cordova and vs2013
Resize iframe to loaded content
Why 13596*0.1 is different than 13596/10?
AngularJS Validate all forms on application load
javascript open popup without menu/url/titlebar/scrollbar/anything
Can I use Razor syntax inside Javascript included in a ScriptBundle?
How to show a box for comment reply with id
parse name from user input when using jquery serialize
How to parse and load javascript object?
Marionette not navigating to the same url
Adding Google+ Sign in button to website
GRUNT - Install Grunt Packages?
how should I create the path of templateUrl property in Angular ui-router?
Update mysql database with jquery array using ajax
Run the same function on each item in a list / array
Get all ticks values (NVD3)
Button Click Event not Passing input String to MVC Controller Method
© Copyright 2017 Publishing Limited. All rights reserved.