A unique toggle has been designed to function in the following manner:
Essentially, when the user hovers over "All runs", the toggle will appear in place of the word "All". The user can then switch it to "Last N", input a value, and then move the mouse away to view their adjustment.
The toggle has been created and is visible on hover, but there are two issues that need addressing:
It is being displayed inline, with the word "All" still showing...the method of hiding this is not clear.
Using the toggle becomes challenging as it disappears when attempting to click due to a gap.
SOLUTION:
Following the suggestions below, a wrapper div was added to capture the mouseover event.
<div class='wrapper'>
<div class='runType'>All </div>
<div class='toggle'>
<div class='all active'>All</div>
<div class='last'>Last <input class='in' type='text' size='1' placeholder='N' /></div>
</div>
<div class='runs'>runs</div>
</div>