{"id":28220837,"url":"https://github.com/morulus/jquery.tie","last_synced_at":"2025-06-10T09:30:41.393Z","repository":{"id":21712740,"uuid":"25034258","full_name":"morulus/jquery.tie","owner":"morulus","description":"Additional functions for HTML build","archived":false,"fork":false,"pushed_at":"2014-10-10T14:40:26.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T13:18:34.294Z","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/morulus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-10T12:21:48.000Z","updated_at":"2014-10-10T14:22:14.000Z","dependencies_parsed_at":"2022-08-18T21:52:51.315Z","dependency_job_id":null,"html_url":"https://github.com/morulus/jquery.tie","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/morulus%2Fjquery.tie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morulus%2Fjquery.tie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morulus%2Fjquery.tie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morulus%2Fjquery.tie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morulus","download_url":"https://codeload.github.com/morulus/jquery.tie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morulus%2Fjquery.tie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259047881,"owners_count":22797614,"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":"2025-05-18T04:16:22.688Z","updated_at":"2025-06-10T09:30:41.318Z","avatar_url":"https://github.com/morulus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jquery.tie\n==========\n\nAdditional functions for HTML build\n\n# Usage\n```javascript\n// Adds a inside div (return this a)\n$(\"div\").put($('\u003ca /\u003e', {\n  \"class\": \"newa\"\n}));\n\n// Adds a after div (return this a)\n$(\"div\").and($('\u003ca /\u003e', {\n  \"class\": \"newa\"\n}));\n\n// Adds a before div (return this a)\n$(\"div\").before($('\u003ca /\u003e', {\n  \"class\": \"newa\"\n}));\n\n// Call anonym function in context of div (return this div)\n$(\"div\").tie(function() {\n  $(this).put($('\u003ca /\u003e'));\n});\n\n// Eval condition and call first function is true and second function if false (return functions result)\n$(\"div\").condition(a==b, function() {\n  return $(this).put($('\u003ca /\u003e'));\n}, function() {\n  $(this).and($('\u003cdiv /\u003e'));\n  return this;\n});\n\n```\n\n# Benefits\nCompact code and ease to creating sub-elements\n```javscript\n  $('body')\n  .put($('\u003cheader /\u003e'))\n  .tie(function() {\n    $(this).put($('\u003ch1 /\u003e')).html('Hello, world')\n    .and($('\u003carticle /\u003e')).html('It's my article'));\n  })\n  .and($('\u003cfooter /\u003e'))\n    .put($('\u003csummary /\u003e')).html('Call me');\n```\n\n# Install\n```bower\n  $ bower install jquery.tie\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorulus%2Fjquery.tie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorulus%2Fjquery.tie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorulus%2Fjquery.tie/lists"}