CopyPastor

Detecting plagiarism made easy.

Score: 0.8060117363929749; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-10-01
by Mohammad Ali Rony

Original Post

Original - Posted on 2014-09-04
by Frederic



            
Present in both answers; Present only in the new answer; Present only in the old answer;

here is the code I used to make case insensitive
open: function (e, ui) { var acData = $(this).data('ui-autocomplete'); acData .menu .element .find('li') .each(function () { var me = $(this); var keywords = acData.term.split(' ').join('|'); me.text(me.text().replace(new RegExp("(" + keywords + ")", "gi"), '<b>$1</b>')); }); }
In jQuery UI 1.11.1, here is the code I used to make it work (case insensitive):
open: function (e, ui) { var acData = $(this).data('ui-autocomplete'); acData .menu .element .find('li') .each(function () { var me = $(this); var keywords = acData.term.split(' ').join('|'); me.text(me.text().replace(new RegExp("(" + keywords + ")", "gi"), '<b>$1</b>')); }); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;