Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery disable button only works IE
    primarykey
    data
    text
    <p>I have a jquery mobile app, this jquery button group is generated with c# </p> <pre><code>&lt;ul class="ui-grid-d"&gt; &lt;li class="ui-block-a"&gt;&lt;a id="MostrarDetallePedido" class="ui-btn ui-btn-up-a" disabled="disabled" href="/Documentos/Docs/DocsDetalle?StrIdDocumento=01500___00000000000000041" data-role="button" data-theme="a" data-ajax="false"&gt;&lt;span aria-hidden="true" class="ui-btn-inner"&gt;&lt;span class="ui-btn-text"&gt;Detalle&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-block-b"&gt;&lt;a id="ItemCondiciones" class="ui-state-disabled ui-btn ui-btn-up-b" disabled="disabled" href="/Documentos/Docs/DocsDetalle?StrIdDocumento=01500___00000000000000041" data-role="button" data-theme="b" data-ajax="false"&gt;&lt;span aria-hidden="true" class="ui-btn-inner"&gt;&lt;span class="ui-btn-text"&gt;Condiciones&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-block-c"&gt;&lt;a id="ItemEliminar" class="ui-state-disabled ui-btn ui-btn-up-c" disabled="disabled" href="/Documentos/Docs/DocsDetalle?StrIdDocumento=01500___00000000000000041" data-role="button" data-theme="c" data-ajax="false"&gt;&lt;span aria-hidden="true" class="ui-btn-inner"&gt;&lt;span class="ui-btn-text"&gt;Eliminar&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-block-d"&gt;&lt;a id="ItemAdiciones" class="ui-state-disabled ui-btn ui-btn-up-d" disabled="disabled" href="/Documentos/Docs/DocsDetalle?StrIdDocumento=01500___00000000000000041" data-role="button" data-theme="d" data-ajax="false"&gt;&lt;span aria-hidden="true" class="ui-btn-inner"&gt;&lt;span class="ui-btn-text"&gt;Adiciones&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-block-e"&gt;&lt;a id="ItemComponentes" class="ui-state-disabled ui-btn ui-btn-up-e" disabled="disabled" href="/Documentos/Docs/DocsDetalle?StrIdDocumento=01500___00000000000000041" data-role="button" data-theme="e" data-ajax="false"&gt;&lt;span aria-hidden="true" class="ui-btn-inner"&gt;&lt;span class="ui-btn-text"&gt;Componentes&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Then i have a jquery func that enable or disable some buttons:</p> <pre><code> function (data) { $(data).find('error').each(function () { if ($(this).text() == 'NoError') { $('#ItemEliminar').prop('disabled', false); $('#MostrarDetallePedido').prop('disabled', false); $('#ItemComponentes').prop('disabled', false); $('#ItemAdiciones').prop('disabled', false); $('#ItemCondiciones').prop('disabled', false); $(data).find('NombreItem').each(function () { $('#NombreItem').text($(this).text()); }) $(data).find('OpcionesItem').each(function () { alert($(this).text()); }) } else { $(data).find('NombreItem').each(function () { $('#NombreItem').text($(this).text()); }) $('#ItemEliminar').prop('disabled', true); $('#MostrarDetallePedido').prop('disabled', false); $('#ItemComponentes').prop('disabled', true); $('#ItemAdiciones').prop('disabled', true); $('#ItemCondiciones').prop('disabled', true); } }) } </code></pre> <p>This function works great but the problem is that it only works on IE. Crhrome and firefox never disable de jquery button.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload