You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is adding a toggle checkbox on auction. If it's checked, items are highlighted based on description that matches the keyword..
Example scenario:
User saves keywords preferences on settings. (e.g "Lucius", "Delicacy").
User visits auction and checks the checkbox
System highlight items (e.g red border around item html element)
I have some sample code that does the job. It can be improved.
var itemHighlightKeywords = new Array("Lucius", "Delicacy"); // read from settings
function highlightItems() {
let items = jQuery(".auction_item_div .ui-draggable");
for (let i = 0; i < items.length; i++) {
let itemProps = jQuery(items[i]).data().tooltip[0];
for (let j = 0; j < itemProps.length; j++) {
for (let k = 0; k < itemHighlightKeywords.length; k++) {
let prop = itemProps[j][0].toString().toLowerCase();
let keyword = itemHighlightKeywords[k].toLowerCase();
if (prop.contains(keyword)) {
jQuery(items[i]).closest(".section-header").css("border", "red solid 4px");
break;
}
}
}
}
}
It looks like this:
The text was updated successfully, but these errors were encountered:
The idea is adding a toggle checkbox on auction. If it's checked, items are highlighted based on description that matches the keyword..
Example scenario:
I have some sample code that does the job. It can be improved.
It looks like this:
The text was updated successfully, but these errors were encountered: