Improve javascript when selecting sidebar items
This commit is contained in:
parent
be40178234
commit
b6d1124d4e
@ -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;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user