on:
workflow_call:
inputs:
path:
required: true
type: string
defaults:
run:
working-directory: ./${{ inputs.path }}
name: build_akado
on:
push:
paths:
- 'akado/**'
pull_request:
paths:
- 'akado/**'
jobs:
build:
uses: ./.github/workflows/build.yml
with:
path: akado
name: Build
on:
workflow_call:
inputs:
path: string
jobs:
init:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./${{ inputs.path }}
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: install modules
run: npm install --legacy-peer-deps
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: build project
run: npm run build
name: buildAkado
on:
workflow_dispatch:
push:
paths:
- 'akado/**'
jobs:
build:
- uses: Tarifnik/react-app/.github/workflows/build.yml
name: Build
on:
workflow_call:
jobs:
init:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: install modules
run: npm install
- name: cache dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: build project
run: npm run build
name: Akado
on:
workflow_dispatch:
push:
jobs:
build:
- uses: Tarifnik/react-app/.github/workflows/buildAndPublish.yml
name: GitHub Actions Demo
on:
push:
paths:
- 'akado/**'
jobs:
init:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: install modules
run: npm install
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: build project
run: npm run build
let count = $("#adult-result").text();
;
$("#adult-result").text(function(index, text) {
return String(parseInt(text) + 1);
});
как только событие прошло, тоесть за пределами, я получаю этот элемент со значением 0, хотя отображает, например 3 $(document).ready(function() {
/* Начинаем работу после полной загрузки DOM */
$("#dropdown-guests-button").click(function(e) {
e.preventDefault();
$(".dropdown-guests").toggleClass("dropdown-guests_default");
$(".dropdown-guests__enter").toggleClass("dropdown-guests__enter_default");
$(".dropdown-guests__choice").toggleClass(
"dropdown-guests__choice_activated"
);
});
$("#adult-plus").on("click", function(e) {
e.preventDefault();
let adultCount = $("#adult-result").val();
$("#adult-result").text(function(index, text) {
return String(parseInt(text) + 1);
});
$("#adult-minus").removeClass(
"dropdown-guests__criterion-quantity-minus_deactivated"
);
});
});
console.log($("#adult-result").text());