diff --git a/package.json b/package.json index 09f2584..034e89f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "scripts": { "start": "parcel src/index.html -p 4500 --open ", - "build": "parcel build ./src/index.html --public-url /cg-select/", + "build": "parcel build ./src/index.html --public-url /", "deploy": "gh-pages -d dist", "predeploy": "npm run build" }, @@ -17,7 +17,7 @@ "bugs": { "url": "https://github.com/MaxOvs19/cg-select/issues" }, - "homepage": "https://maxovs19.github.io/cg-select/", + "homepage": "https://cg-select.itguild.info", "devDependencies": { "@parcel/transformer-sass": "^2.7.0", "parcel": "^2.7.0", diff --git a/src/exemple-page.js b/src/exemple-page.js new file mode 100644 index 0000000..98c3da0 --- /dev/null +++ b/src/exemple-page.js @@ -0,0 +1,34 @@ +const firstBtn = document.getElementById('first'); +const codeFirst = document.getElementById('codeFirst'); + +const secondBtn = document.getElementById('second'); +const codeSecond = document.getElementById('codeSecond'); + +const thirdBtn = document.getElementById('third'); +const codeThird = document.getElementById('codeThird'); + +const fourthBtn = document.getElementById('fourth'); +const codeFourth = document.getElementById('codeFourth'); + +const fifthBtn = document.getElementById('fifth'); +const codeFifth = document.getElementById('codeFifth'); + +firstBtn.addEventListener('click', () => { + codeFirst.classList.toggle("active") +}) + +secondBtn.addEventListener('click', () => { + codeSecond.classList.toggle("active") +}) + +thirdBtn.addEventListener('click', () => { + codeThird.classList.toggle("active") +}) + +fourthBtn.addEventListener('click', () => { + codeFourth.classList.toggle("active") +}) + +fifthBtn.addEventListener('click', () => { + codeFifth.classList.toggle("active") +}) diff --git a/src/index.html b/src/index.html index d5d45f0..bba2dec 100644 --- a/src/index.html +++ b/src/index.html @@ -26,24 +26,129 @@
+
+ const dropdown = new DropDown({
+ selector: '.cg-dropdown_checkboxDisable',
+ placeholder: 'Выберите авто',
+ lable: 'EXAMPLE',
+ items: [
+ 'BMW',
+ {
+ id: '213sade',
+ title: 'Opel',
+ value: 1,
+ },
+ 'Mersedes',
+ 'MAN',
+ 'Ferari',
+ ],
+ styles: {
+ head: {
+ width: '830px',
+ },
+ list: {
+ width: '824px',
+ },
+ placeholder: {
+ maxWidth: '500px ',
+ },
+ },
+ });
+
+