Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery css selector and plugins + jqgrid
    text
    copied!<p>I'm using several plugins attributed to css selectors and has been working properly. The trouble is that by doing the same with the plugin jqgrid with edit mode, this same technique is not working.</p> <p>I'll try to explain: for example.</p> <p>I have a separate js file where I put the following</p> <pre><code>$ (". JQmaskdata"). InputMask ("99-99-9999") / / imput mask plugin / * Animate options: clip, fold, slide * / $ (". JQCalendar"). Datepicker ( {DateFormat, 'dd-mm-yy' Regional: 'en', / / ​​file regional [pt.js] showAnim 'clip' showButtonPanel: true / / show the button to go to close the current date + } ); </code></pre> <p>if you do the following in an existing element on the page: </p> <p>The result will be as expected. (Will show the masks and the calendar)</p> <p>I'm doing this so that objects on the page that have these classes (JQmaskdata JQCalendar) can inherit this functionality.</p> <p>I'm trying to do the same for jqgrid edit mode but is not working as expected</p> <p>example with relevant code,</p> <hr> <pre><code> / / Load Grid $ ("# List"). JqGrid ({ datatype: "local" width: 465, / / Height: 280, colNames: ["ID", "", "Description", "", ""] colModel: [ {Name: 'id', index: 'id', sorttype: "int", hidden: true}, {Name: "data", index, "data", width: 80, editable: true, EditType "text", **editoptions: {dataInit: function (elem) {$ (elem). addClass ('JQmaskdata JQCalendar');}} },** {Name: "table," index "table", editable: false, hidden: true}, {Name: "Action" index "action", width: 80, sortable: false, search: false} / / Buttons ] loadtext: 'Loading ...', .......... </code></pre> <p>The class is correctly placed in the input but does not work.</p> <p>Thank you very much</p> <hr> <p>Hello Scruffy The Janitor, yes, it's on purpose. it's two separated classes. one two the mask and the other for the calendar. </p> <p>In short if I do this in an existing page input works</p> <p><code>&lt;input type="text" id="mindadata" class="JQmaskdata JQCalendar" value="mindadata" /&gt;</code> works</p> <p>But if you do not work the same in the edit jqgrid.</p> <p>markup of jqgrid using inspect element of google crhome</p> <pre><code>&lt;td role="gridcell" aria-describedby="list_descr" style="" title=""&gt; &lt;input type = "text" id = "0_descr" name = "descr" class = "editable JQmaskdata JQCalendar" style = "width: 98%; "role =" textbox "&gt; &lt;/ td&gt; </code></pre>
 

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