Good afternoon !
I have a simple problem , I have this code that works correctly.
<a onclick='flotante(1)' data-auction="+data.subastas[i].id+" class='tester btn btn-default col-md-12'>Pujar</a>
This code return the id of subasta , then I am using Laravel and PHP , when the user is log and click on Auction , I need to call a jquery function.
I have the following code
@if(Auth::user()) AA @else Inicio de sesión
<div class="row ">
<div class="col-md-6">
<label for="email">Email</label>
</div>
<div class="col-md-6">
<input type="email" name="email" class="form-control margeninput"/>
</div>
</div>
<div class="row ">
<div class="col-md-6">
<label for="password">Password</label>
</div>
<div class="col-md-6">
<input type="password" name="password" class="form-control margeninput"/>
</div>
</div>
<div class="row ">
<input type="submit" id="singlebutton" class=" col-md-6 col-md-offset-3 " name="singlebutton" style="margin-bottom:5px;"></input>
</div>
</fieldset>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>
@foreach ($errors->all() as $error)
<div class="bderrors">
<p class="span-error">{{ $error }}</p>
</div>
@endforeach
@endif
However I try to use this
@if(Auth::user())
<script type="text/javascript">
alert("OK");
</script>
@else
This code works when the user is login but not when user has doing click in auction.
Could anyone help to me?