Skip to content

Instantly share code, notes, and snippets.

Created July 30, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e770ec50946186c63981 to your computer and use it in GitHub Desktop.
Save anonymous/e770ec50946186c63981 to your computer and use it in GitHub Desktop.
############# CODE IN TABLE #############
<skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="true" model="PurchaseOrderItems" uniqueid="CustomFieldEditor" buttonposition="" mode="edit">
<fields>
<field id="Quantity_Purchased__c" decimalplaces="" valuehalign="" type=""/>
<field id="Inventory_Key__c" valuehalign="" type="">
<label>Inventory Code</label>
</field>
<field id="Price_Each__c"/>
</fields>
<rowactions>
<action type="delete">
<drawer title="Drawer Area" width="800" closehandle="true">
<components/>
</drawer>
</action>
</rowactions>
<massactions usefirstitemasdefault="true"/>
<views>
<view type="standard"/>
</views>
<searchfields/>
<actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true"/>
</skootable>
############# JAVASCRIPT CODE #############
(function(skuid){
var $ = skuid.$;
$(function(){
$('#CustomFieldEditor').find('input.ui-autocomplete-input').on('focusout', function(){
console.log('test');
});
});
})(skuid);
@moshekarmel1
Copy link

I would imagine that "find('input.ui-autocomplete-input')" may be returning more than one element. You can try to loop through all of the found elements and add a listener to each one:

$('#CustomFieldEditor').find('input.ui-autocomplete-input').each(function(i, elem){
$(elem).on('focusout', function(){
console.log('test');
});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment