Improve javascript when selecting sidebar items

This commit is contained in:
Deon George 2024-01-20 16:03:15 +11:00
parent be40178234
commit b6d1124d4e
1 changed files with 3 additions and 3 deletions

View File

@ -59,11 +59,11 @@
@section('page-scripts') @section('page-scripts')
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
$('.server-icon').click(function(e) { $('.server-icon > a').on('click',function(item) {
var content; var content;
$.ajax({ $.ajax({
url: $(this).children('a:first-child').attr('href'), url: $(this).attr('href'),
method: 'GET', method: 'GET',
dataType: 'html', dataType: 'html',
statusCode: { statusCode: {
@ -83,7 +83,7 @@
alert('Well that didnt work?'); alert('Well that didnt work?');
}); });
e.stopPropagation(); item.stopPropagation();
return false; return false;
}); });