Answer the question
In order to leave comments, you need to log in
Why do click and other events fire 2 times inside vuejs id=app tag?
hello, I started translating the site to vujs, there is a button
<button type="button"
id="js-add-city"
data-action ="{{ route('addCity', ['account' => Route::input('account'), 'region' => $region['id']]) }}"
>
<span class="glyphicon glyphicon-plus"></span>
Добавить город
</button>
$(document).ready(function() {
$(document.body).on('click', '#js-add-city', function () {
var $button = $(this);
.....
});
});
<div id="app">
@yield('content')
</div>
@extends('layouts.base')
@section('content')
<div id="app">
.....
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question