{"id":20251654,"url":"https://github.com/jfmdev/jqjigsawpuzzle","last_synced_at":"2025-04-10T23:15:28.227Z","repository":{"id":35149824,"uuid":"39377786","full_name":"jfmdev/jqJigsawPuzzle","owner":"jfmdev","description":"A JavaScript library that lets you create jigsaw puzzles in your web pages","archived":false,"fork":false,"pushed_at":"2016-12-08T14:29:17.000Z","size":236,"stargazers_count":23,"open_issues_count":1,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T23:15:00.583Z","etag":null,"topics":["html5","javascript","jigsaw-puzzle","jquery","jquery-ui","puzzle-game","web-game"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"m110/climb","license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfmdev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-20T10:30:56.000Z","updated_at":"2025-03-30T15:54:35.000Z","dependencies_parsed_at":"2022-09-13T02:23:14.052Z","dependency_job_id":null,"html_url":"https://github.com/jfmdev/jqJigsawPuzzle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqJigsawPuzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqJigsawPuzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqJigsawPuzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqJigsawPuzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfmdev","download_url":"https://codeload.github.com/jfmdev/jqJigsawPuzzle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312134,"owners_count":21082638,"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":["html5","javascript","jigsaw-puzzle","jquery","jquery-ui","puzzle-game","web-game"],"created_at":"2024-11-14T10:11:58.964Z","updated_at":"2025-04-10T23:15:28.198Z","avatar_url":"https://github.com/jfmdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jqJigsawPuzzle\n==============\n\n**jqJigsawPuzzle** is a JavaScript library that lets you create jigsaw puzzles in your web pages.\n\nIt requires _jQuery_ and _jQuery UI_, and, by the moment, it only works in webkit browsers, since it uses the CSS property `-webkit-mask-image`.\n\nUsage\n-----\n\nIn order to use _jqJigsawPuzzle_, first you must include the JavaScript and CSS files of _jqJigsawPuzzle_, _jQuery_ and _jQuery UI_ into your page's `\u003chead\u003e` tag:\n\n```javascript\n\u003clink type=\"text/css\" rel=\"stylesheet\" href=\"jquery-ui.custom.css\"/\u003e\n\u003clink type=\"text/css\" rel=\"stylesheet\" href=\"jqJigsawPuzzle.css\"/\u003e\n    \n\u003cscript type=\"text/javascript\" src=\"jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"jquery-ui.custom.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"jqJigsawPuzzle.js\"\u003e\u003c/script\u003e\n```\n\nAnd then you must call one of the _jqJigsawPuzzle_ methods:\n\n  * _jqJigsawPuzzle.createPuzzleFromImage_: transform a `\u003cimg\u003e` element into a puzzle.\n  * _jqJigsawPuzzle.createPuzzleFromURL_: adds a puzzle into a `\u003cdiv\u003e` element, using an image defined by a URL.\n\nFor example:\n\n```html\n\u003cdiv\u003e\n    \u003cimg id=\"my_puzzle\" src=\"img/alaska-cliffs.jpg\" alt=\"\"/\u003e\n\u003c/div\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    jQuery(document).ready(function() {\n        jqJigsawPuzzle.createPuzzleFromImage(\"#my_puzzle\");\n    });\n\u003c/script\u003e\n```\n\nMethods description\n-------------------\n\n### jqJigsawPuzzle.createPuzzleFromImage\n\nCreates a puzzle from a `\u003cimg\u003e` element.\n\n```javascript\njqJigsawPuzzle.createPuzzleFromImage = function(imageSelector, options);\n```\n\n**Parameters**\n\nParameter | Description\n--------- | -----------\n`imageSelector` | A CSS selector or a jQuery's object for select the `\u003cimg\u003e` element.\n`options` | _(optional)_ An associative array with the properties (all of them optionals): `piecesSize` (which defines the size of the pieces, it can take the values 'normal', 'big' or 'small'), `borderWidth` (an integer which defines the width of the border around the puzzle) and `shuffle` (an associative array with the values `rightLimit`, `leftLimit`, `topLimit` and `bottomLimit`, which allow to extends the limits in with the pieces are moved when they are shuffled, since normally they are restricted to the puzzles frame).\n\n### jqJigsawPuzzle.createPuzzleFromURL\n\nCreates a puzzle inside a `\u003cdiv\u003e` element, using an image defined by a URL.\n\n```javascript\njqJigsawPuzzle.createPuzzleFromURL = function(containerSelector, imageUrl, options)\n```\n\n**Parameters**\n\nParameter | Description\n--------- | -----------\n`containerSelector` | A CSS selector or a jQuery's object inside which create the puzzle.\n`imageUrl` | An string with the image's URL.\n`options` | _(optional)_ An associative array with the properties (all of them optionals): `piecesSize` (which defines the size of the pieces, it can take the values 'normal', 'big' or 'small'), `borderWidth` (an integer which defines the width of the border around the puzzle) and `shuffle` (an associative array with the values `rightLimit`, `leftLimit`, `topLimit` and `bottomLimit`, which allow to extends the limits in with the pieces are moved when they are shuffled, since normally they are restricted to the puzzles frame).\n\nLicense\n-------\n\nThis library is free software; you can redistribute it and/or\nmodify it under the terms of the Mozilla Public\nLicense v2.0. You should have received a copy of the MPL 2.0 along with this library, otherwise you can obtain one at \u003chttp://mozilla.org/MPL/2.0/\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfmdev%2Fjqjigsawpuzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfmdev%2Fjqjigsawpuzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfmdev%2Fjqjigsawpuzzle/lists"}