{"id":15612468,"url":"https://github.com/kylefox/jquery-formwatch","last_synced_at":"2025-04-28T17:27:00.199Z","repository":{"id":66575060,"uuid":"2275765","full_name":"kylefox/jQuery-FormWatch","owner":"kylefox","description":"Monitor forms for changes in data","archived":false,"fork":false,"pushed_at":"2015-10-29T10:07:08.000Z","size":203,"stargazers_count":23,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T18:33:24.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylefox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-26T18:16:54.000Z","updated_at":"2022-06-02T18:40:48.000Z","dependencies_parsed_at":"2023-03-07T15:57:30.044Z","dependency_job_id":null,"html_url":"https://github.com/kylefox/jQuery-FormWatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2FjQuery-FormWatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2FjQuery-FormWatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2FjQuery-FormWatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2FjQuery-FormWatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylefox","download_url":"https://codeload.github.com/kylefox/jQuery-FormWatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251354114,"owners_count":21576135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T06:43:10.063Z","updated_at":"2025-04-28T17:27:00.179Z","avatar_url":"https://github.com/kylefox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jQuery FormWatch: easily monitor changes in form data.\n\nWhat it does\n============\n\nThis plugin lets you watch a form for data changes. This lets you, for example, easily notify users when they have unsaved changes (particularly important in single-page apps).\n\nYou can [view the demo](http://dl.dropbox.com/u/780754/jQuery-FormWatch/demo/index.html) to see the basic idea in action.\n\nUsage\n=====\n\nMonitor the form you're interested in:\n\n    $('form').watch();\n  \nThen bind to the watch events:\n\n    // 'modified' - Fired when data changes.\n    $('form').bind('modified', function() {\n      unsavedChanges.show();\n    });\n  \n    // 'reverted' - Fired when data changes back to the initial state.\n    $('form').bind('reverted', function() {\n      unsavedChanges.hide();\n    });\n\nAccessing changed data\n----------------------\n    \nEvent handlers are passed three parameters:\n\n* `newData` : The new (current) form data.\n* `oldData` : The previous form data.\n* `originalData` : Form data initially present when `.watch()` was called.\n\nIt's **highly recommended** you use [jQuery BBQ](https://github.com/cowboy/jquery-bbq/) if you plan to use these parameters in your event handlers. BBQ will convert the parameters to objects, rather than the default strings (which aren't very useful).\n\nFor example:\n  \n    // Assume this form has a single field called `faveAnimal`\n    $('form').bind('modified', function(newData, oldData, originalData) {\n      console.log(\"Your fave animal changed from \" + oldData.faveAnimal + \" to \" + newData.faveAnimal);\n    });\n  \nNote that FormWatch *does not indicate which specific form fields have changed.* If you need this kind of functionality, simply use [jQuery Diff](http://plugins.jquery.com/project/jquery-diff) in your event handlers.\n\nWhy?\n====\n\nBinding to individual form elements is a pain, and `form.change()` only fires on blur. This plugin lets you respond to changes in a form's data in real time.\n\nBugs, feedback, or patches?\n===========================\n\nWhy, just use the [issue tracker](https://github.com/kylefox/jQuery-FormWatch/issues) right here on GitHub!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fjquery-formwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylefox%2Fjquery-formwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fjquery-formwatch/lists"}