I have several inputs on my html view and i'd like to add a functionality of such: when you hover over an input and you use mouse scroll, the value of that input changes (picks another index from an array for text inputs or ascend/descend value for numeric ones). Using event binding isn't very sufficient for me as I am using different viewmodels for those inputs and different settings, thus, I was thinking of using an extender that extends an observable value, but I don't really know how to target events (mousescroll over an element) in that extender. Is extender a right way to go, or shall I instead stick with those event bindings on view side?
Change value of input on mouse scroll with knockout.js
615 Views Asked by Maciej Kwas At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in EVENTS
- Stop propagation of javasript/leaflet click event that starts in one element and ends in another
- Detecting click inside and outside of the listening component in Angular
- How to use mocha unit test chokidar watch events
- writing event_management in unity
- Where to put event handler method of an inherited class in C++ Builder?
- Event_date reference in CTE
- WinForms, event unable to subscribe from a custom class
- How to intercept a request made by a form submit in JavaScript?
- Communicating from Parent to Child in Blazor
- How to Customize Sitecore Copy operation
- grand parent is handling custom event emitted instead of parent in Angular 17
- jquery not capturing all input value changes
- Is there a way to force the focus on a determined window tab?
- How to watch user browsing activity from a background service?
- Trigger Once in React native
Related Questions in KNOCKOUT.JS
- Force Magento 2's checkout accordion to be open on first step, closed on second step
- Unable to process binding "value: function() {return myVar }"
- I am getting Failed to load resource: the server responded with a status of 500 (Internal Server Error) - intermittently in Knocout/MVC app
- Knockout Computed field never updates UI
- Add values in form input in Javascript (Chrome)
- Magento 2: wrong shipping method saved in order
- How to add multiple method titles to KnockoutJS ifnot statement in Magento2
- Uncaught TypeError error in Chrome for multiple file upload
- Apexcharts <svg> attribute height: Expected length, "NaN" when loading other page
- Is toString() JavaScript output "guaranteed" to be the same in every browser/implementation?
- How does the knockout rendering for imagepicker work in SurveyJS Survey Creator
- Knockout.js - Subscription to observable selected value in cascading select list firing twice
- Malware in Knockoutjs context debugger
- Magento 2 Minicart / Knockout.js: Format calculated price / sum
- Magento 2: How to open a modal for each related product using UI component?
Related Questions in TYPESCRIPT
- It doesnt always show all the books on my homepage
- S3 integration testing
- Make some of the type's field optional
- storybook 7 does not recognize module declarations
- Page in React only renders elements after refreshing
- Error Inserting into Supabase: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- Get remote MKV file metadata using nodejs
- Vue/TailwindCSS - Content is behind Sidebar
- TypeScript Error only on big type only when assigned to a variable
- pnpm firebase app "Could not find a declaration file for module 'mime'"
- TypeScript: Type checking while parsing an arbitrary JSON that is typed/
- Issue with BBCode image tag on React
- Typescript: returnType based on value 'single' prop
- Failed to resolve import, but the path is valid, and detected as such by VSCode
Related Questions in EXTENDER
- multiple cancel controlID on modal popup extender
- Why ESP32 is not receiving the sending wifi signals?
- ko.observable() trim ending whitespace
- Ho to use Extender in Drupal?
- Change value of input on mouse scroll with knockout.js
- Ajax HTML editor extender -textbox on key down javascript calls another function
- How to make DeferWindowPos work for VB6 ActiveX controls?
- photo album using ajax slideshow extender
- asp.net calendar extender postback
- Knockout JS extender for validation in master-detail scenario
- Observables initialized/attached to Observable in extender not initialized at page load
- Ajax client-side framework failed to load, sys undefined
- Modalpopupextender not firing
- Could not load type AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider
- Applying multiple extenders in knockout
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I believe that custom binding handler is a way to go. All the model to DOM communication should be done via handlers. Extenders are just the way to add additional functionality to an observable. Here is an example of such handler:
Working fiddle