Select all parameter options that contain item DigiKey - Page 1
Forum section: electronics / beginners

author: Nogtail
author_rank: Regular Contributor
timestamp: December 10, 2017, 04:57:46 am
content: How would I select all parameter options that contain a certain item without manually scrolling through hundreds of options? For example: I want a microcontroller with USB, I don't care if it has UART, SPI or any other connectivity options, all I care about is USB. Do I have to search through all the options and select everything with USB or Is there a better way?I know I can use the 'search within results' box, but it never seems to be as good.

author: Tomorokoshi
author_rank: Super Contributor
timestamp: December 10, 2017, 05:16:45 am
content: In the initial search box, enter "USB". Select "Embedded - Microcontrollers" in the list of categories generated from the search. I happen to get 12579 items. Select through and then narrow down to realistic and non-repetitive options by selecting:Cut Tape (CT) in PackagingActive in Part StatusIn Stock in Stock StatusApply FiltersNow for me it's down to 538 items. Filter out by manufacturer, package, etc. Sort by price. Should be able to narrow in quickly.

author: Nogtail
author_rank: Regular Contributor
timestamp: December 10, 2017, 01:53:30 pm
content: Quote from: Tomorokoshi on December 10, 2017, 05:16:45 amThe search seems to work better than I expected! I ended up making a bookmarklet (yep, they still exist) that selects options to see what the difference was, and I got around 8500 items when selecting USB, or 12071 if selecting USB and USB OTG.The bookmarklet probably has limited use, but if anyone wants it, copy this to a bookmark URL and click the bookmark when on a DigiKey search page:Code:javascript:(function(){$("#appliedFilterOptions .ptable-param").css("position","relative").prepend($("<div>",{class:"param-overlay",text:"Edit",css:{position:"absolute",top:0,right:0,left:0,bottom:0,margin:"3px",color:"white",cursor:"pointer","text-align":"center","line-height":"156px","font-size":"22px","background-color":"rgba(0,0,0,0.75)"},click:function(){function t(t){return t.text().trim().split(", ")}var e=[],o=$(this).next().children();o.each(function(){$.each(t($(this)),function(t,o){-1===e.indexOf(o)&&e.push(o)})}),$(".param-overlay").remove();var i=$("<ul>",{css:{"text-align":"left","list-style-type":"none",padding:"0",margin:"0 0 6px 0"}});i.append($("<p>",{text:"Scroll to bottom for apply button",css:{padding:0,margin:0,color:"red","font-weight":"bold","text-align":"center"}})),$.each(e.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),function(t,e){i.append($("<li>").append($("<input>",{type:"checkbox",id:"overlay-checkbox-"+t})).append($("<label>",{text:e,for:"overlay-checkbox-"+t})))});var n=$("<div>",{css:{position:"fixed",width:"100%",height:"100%","z-index":1,"background-color":"rgba(0,0,0,0.75)"},html:$("<div>",{html:$("<button>",{text:"Apply",class:"button primary",click:function(){var e=[];i.children().each(function(){$(this).children("input").prop("checked")&&e.push($(this).children("label").text())}),o.each(function(){var o=$(this);o.prop("selected",!1),$.each(e,function(e,i){-1!==t(o).indexOf(i)&&o.prop("selected",!0)})}),n.remove(),$(o.get(0)).trigger("change")}}),css:{position:"absolute",height:"50%",margin:"auto",width:"250px","background-color":"white",top:0,left:0,right:0,bottom:0,padding:"3px","overflow-y":"scroll","text-align":"center"}}).prepend(i)});$("body").prepend(n)}}));})();