{"id":18311087,"url":"https://github.com/dmitriyakkerman/dom-library","last_synced_at":"2025-04-09T12:11:06.158Z","repository":{"id":144074451,"uuid":"275905104","full_name":"dmitriyakkerman/dom-library","owner":"dmitriyakkerman","description":"Lightweight JS library for DOM manipulation","archived":false,"fork":false,"pushed_at":"2021-02-26T08:25:32.000Z","size":6591,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T06:16:52.845Z","etag":null,"topics":["dom-library","dom-manipulation"],"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/dmitriyakkerman.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T19:16:44.000Z","updated_at":"2021-05-18T12:49:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb6c46ae-4898-402b-afe9-7936c90255d5","html_url":"https://github.com/dmitriyakkerman/dom-library","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/dmitriyakkerman%2Fdom-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fdom-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fdom-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fdom-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriyakkerman","download_url":"https://codeload.github.com/dmitriyakkerman/dom-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036066,"owners_count":21037092,"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":["dom-library","dom-manipulation"],"created_at":"2024-11-05T16:16:24.109Z","updated_at":"2025-04-09T12:11:06.134Z","avatar_url":"https://github.com/dmitriyakkerman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/dmitriyakkerman/dom-library.svg?branch=master)](https://travis-ci.org/dmitriyakkerman/dom-library)\n[![TypeScript](https://badges.frapsoft.com/typescript/love/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)\n\nUsage:      \n \n    $d('div')                                   =\u003e all DIV elements on the page\n    $d('#box')                                  =\u003e element with id \"box\"\n    $d('.box')                                  =\u003e all elements with className \"box\"          \n    $d('.box').html('\u003cdiv\u003eNew one\u003c/div\u003e');      =\u003e changing innerHTML of elements with className \"box\"  \n    $d('.box').text('Some text');               =\u003e changing textContent of elements with className \"box\"     \n    $d('.box').css('color', 'red')              =\u003e adding style property and value to the elements with className \"box\"\n    $d('.box').css({\n        color: 'red', \n        border: 'solid #000 1px'\n    });                                         =\u003e adding multiple style properties and values to the elements with className \"box\"\n    $d('.box').addClass('someClass');           =\u003e adding additional className to the elements with className \"box\"        \n    $d('.box').removeClass('someClass');        =\u003e removing className \"someClass\" from the elements with className \"box\"              \n    $d('.box').toggleClass('someClass');        =\u003e toggling className \"someClass\" from/to the elements with className \"box\"\n    $d('.box').hasClass('someClass');           =\u003e checking if elements with className \"box\" have additional className \"someClass\"\n    $d('.box').attr('title')                    =\u003e checking the value of \"title\" attribute of the elements with className \"box\"\n    $d('.box').attr('title', 'first')           =\u003e settting the value to \"title\" attribute to the elements with className \"box\"\n    $d('.box').find('.child')                   =\u003e finding element with className \"child\" inside element with className \"box\"\n    $d('.box').closest('.parent')               =\u003e checking if element with className \"box\" has parent with className \"parent\"\n    $d('.box').prev()                           =\u003e finding previous element sibling of element with className \"box\"\n    $d('.box').next()                           =\u003e finding next element sibling of the element with className \"box\"\n    $d('.box').parent()                         =\u003e finding parent element of the element with className \"box\"\n    $d('.box').first()                          =\u003e finding first child element of the element with className \"box\"\n    $d('.box').last()                           =\u003e finding last child element of the element with className \"box\"\n    $d('.box').prepend('\u003cdiv\u003eHi\u003c/div\u003e')         =\u003e prepending DIV element inside element with id \"box\"\n    $d('.box').append('\u003cdiv\u003eHi\u003c/div\u003e')          =\u003e appending DIV element inside element with id \"box\"  \n    $d('.box').remove();                        =\u003e removing element/elements with className \"box\"\n    $d('.box').on('click', function(){})        =\u003e adding eventListener to the elements with className \"box\"\n    $d('.box').on('click', 'a', function(){})   =\u003e adding eventListener to 'a' tags inside the elements with className \"box\"\n    $d(function(){                              =\u003e adding className to element on DOMContentLoaded event\n      $d('.box').addClass('someClass');\n    }    \n        \n    Chaining\n        \n    $d(\".box\").html('\u003cdiv\u003eToday is a good day\u003c/div\u003e').text('Could be better').addClass('my-class').removeClass('my-class').toggleClass('new-class').remove();    \n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Fdom-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriyakkerman%2Fdom-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Fdom-library/lists"}