Advertisement
thephpx

Typeahead Multiple Selector

May 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dynamicSelect(id){
  2. $.typeahead({
  3. input: '#selector_typeahead'+id,
  4. },
  5. callback: {
  6.                 onShowLayout:function (node, query){
  7.                     // this sets the current selectors z-index to max value
  8.                     $(node).parent().parent().parent().parent().css('z-index','1041')
  9.                 },
  10.                 onHideLayout:function (node, query){
  11.                     // this sets the current selectors z-index to min value
  12.                     // resetting to min value allows the current selection result appear on top always
  13.                     $(node).parent().parent().parent().parent().css('z-index','0');
  14.                 }
  15. }
  16. );
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement