{"id":16482623,"url":"https://github.com/mfix22/floating_help_button","last_synced_at":"2026-05-15T03:31:52.453Z","repository":{"id":87401615,"uuid":"38223280","full_name":"mfix22/floating_help_button","owner":"mfix22","description":"Floating button that expands into a perfect form area. Both the form and button are draggable!","archived":false,"fork":false,"pushed_at":"2017-04-04T00:59:59.000Z","size":415,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T11:48:08.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfix22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-29T02:21:45.000Z","updated_at":"2017-04-04T01:00:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd33d882-024c-4764-9da9-8e701623e64b","html_url":"https://github.com/mfix22/floating_help_button","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/mfix22%2Ffloating_help_button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Ffloating_help_button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Ffloating_help_button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Ffloating_help_button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfix22","download_url":"https://codeload.github.com/mfix22/floating_help_button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241214435,"owners_count":19928314,"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-11T13:11:27.993Z","updated_at":"2026-05-15T03:31:52.412Z","avatar_url":"https://github.com/mfix22.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"The floating help button is a **draggable** button that is _beyond easy_ to add to your page and works perfectly as a floating action button for messaging, customer support, and more. Works great on your material design page. You can also turn of the drag ability.\n\n## Getting Started\n\n```bash\ngit clone https://github.com/mfix22/floating_help_button.git\n```\n\nLink the css and js files to your page\n```html\n\u003clink rel=\"stylesheet\" href=\"css/help.css\"\u003e\n...\n\u003cscript src=\"js/help.js\"\u003e\u003c/script\u003e\n\u003c!--JQuery--\u003e\n\u003cscript\u003ewindow.jQuery || document.write('\u003cscript src=\"js/vendor/jquery-1.11.2.js\"\u003e\u003c\\/script\u003e');\u003c/script\u003e\n```\n\n## Usage\nAdd a div with a `.help.inactive` class to your page. Add `id=\"help\"` if you want your button to be draggable\n```html\n\u003cdiv class=\"help inactive\"  id=\"help\"\u003e\n```\n\nThat is all you need! However there are a few things you can do to customize your floating help button\n\nWithin the `.help.inactive` div, add a `\u003cp class=\"help-text\"\u003e\u003c/p\u003e` with text or an icon that will be displayed before the button is pressed. \n\nWithin the `.help.inactive` div, ad a `\u003cdiv class=\"helpbox\"\u003e\u003c/div\u003e` with the elements you want hidden until the button has been pressed\n\nBasic form example:\n```html\n\u003cdiv class=\"help inactive\"  id=\"help\"\u003e\n    \u003cp class=\"help-text\"\u003e?\u003c/p\u003e\n    \n    \u003cdiv class=\"helpbox\"\u003e\n        \u003ci class=\"icon ion-close-round x\"\u003e\u003c/i\u003e\n        \u003cdiv class=\"help-form\"\u003e\n            \u003cdiv class=\"form-group\"\u003e\n                \u003cinput type=\"email\" class=\"form-control\" id=\"email\" placeholder=\"Email\" required\u003e\n            \u003c/div\u003e\n            \u003ctextarea class=\"form-control\" rows=\"5\" id=\"message\" placeholder=\"Message\" required\u003e\u003c/textarea\u003e\n            \u003cbutton type=\"submit\" id=\"help-submit\" class=\"btn  btn-lg btn-block\"\u003eSEND\u003c/button\u003e\n        \u003c/div\u003e\n            \n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## Options\nYou can customize the position, colors, and more by passing the options as so: \n```js\nvar options = {\n    draggable : false,\n    top: '50%',\n    left: '50%',\n    send: function(){\n        alert(\"Hello\");\n    },\n    color: \"blue\",\n    background_color: \"salmon\"\n};\nset(options);\n```\n\n\nMake sure to place this script **after** your link to `help.js`.\n\n### Option information\n Name          | Type        | Default     | Description \n ------------- | ----------- | ----------- | ----------- \n draggable     | boolean     | _true_      | Sets whether you want the button to be draggable or not\n top           | string      | _90%_       | Sets position of button from top\n left          | string      | _90%_       | Sets position of button from top\n send          | function    | _null_      | This function is called by the button with id `#help-submit`\n color         | string      | _#3B70BF_   | Used to color features of the help button\n background_color| string    | _white_   | Used as the background color of the help button\n\n##Example\n```html\n\u003chead\u003e\n\t\u003clink href=\"http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css\" rel=\"stylesheet\"/\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003cdiv class=\"help inactive\"  id=\"help\"\u003e\n\t\t\u003c!--Elements with class 'x' will close the help button--\u003e\n\t    \u003ci class=\"icon ion-close-round x\"\u003e\u003c/i\u003e \n\t    \u003c!--Elements within 'help-form' will be hidden until the button is clicked--\u003e\n\t    \u003cdiv class=\"help-form\"\u003e\n\t        \u003cdiv class=\"form-group\"\u003e\n\t            \u003cinput type=\"email\" class=\"form-control\" id=\"email\" placeholder=\"Email\" required\u003e\n\t        \u003c/div\u003e\n\t        \u003ctextarea class=\"form-control\" rows=\"5\" id=\"message\" placeholder=\"Message\" required\u003e\u003c/textarea\u003e\n\t        \u003c!--Funtion 'send' passed in with options is called when this button is clicked--\u003e\n\t        \u003cbutton type=\"submit\" id=\"help-submit\" class=\"btn  btn-lg btn-block\"\u003eSEND\u003c/button\u003e\n\t    \u003c/div\u003e\n\t\u003c/div\u003e\n\t\n\t...\n\n\t\u003cscript\u003ewindow.jQuery || document.write('\u003cscript src=\"js/vendor/jquery-1.11.2.js\"\u003e\u003c\\/script\u003e');\u003c/script\u003e\n\t\u003cscript src=\"js/help.js\"\u003e\u003c/script\u003e\n\t\u003cscript\u003e\n\t\tvar options = {\n\t        draggable : false,\n\t        top: '50%',\n\t        left: '50%',\n\t        send: function(){\n\t            alert(\"Hello\");\n\t        },\n\t        color: \"blue\",\n\t        background_color: \"salmon\"\n\t    };\n\t    set(options);\n\t\u003c/script\u003e\n\u003c/body\u003e\n```\n\n\nI created the form seen in the example `index.html` thanks to [Bootstrap](http://getbootstrap.com/) and [Ionicons](http://ionicons.com/) if you want to recreate this example!:\n```html\n\u003clink rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css\"\u003e\n\u003clink href=\"http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css\" rel=\"stylesheet\"/\u003e\n```\n\n## Coming Soon\n- Bower install\n- Live dragging (with move cursor)\n- Ability to have multiple floating help buttons on a page (and no need for `id=\"help\"`)\n\n---\n\n[MIT License](https://github.com/mfix22/floating_help_button/blob/master/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfix22%2Ffloating_help_button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfix22%2Ffloating_help_button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfix22%2Ffloating_help_button/lists"}