mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-10 07:47:34 +00:00
Wait until jQuery is loaded before making clicky table
This commit is contained in:
parent
ec15770339
commit
4c2844e17e
@ -28,6 +28,14 @@ function navbar($links) {
|
|||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<link href="includes/css/bootstrap.min.css" rel="stylesheet">
|
<link href="includes/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="includes/css/custom.css" rel="stylesheet">
|
<link href="includes/css/custom.css" rel="stylesheet">
|
||||||
|
<script type="text/javascript">
|
||||||
|
function withjQuery(f) {
|
||||||
|
if (window.jQuery) f();
|
||||||
|
else window.setTimeout(function () {
|
||||||
|
withjQuery(f);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<header class="navbar navbar-default navbar-static-top" role="banner">
|
<header class="navbar navbar-default navbar-static-top" role="banner">
|
||||||
|
@ -361,7 +361,7 @@ class Page {
|
|||||||
public function table_end($clicky = true) {
|
public function table_end($clicky = true) {
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
if ($clicky) {
|
if ($clicky) {
|
||||||
echo "<script type=\"text/javascript\">$('tr').click(function(){window.location=$(this).find('a').attr('href');}).hover(function(){\$(this).toggleClass('hover');});</script>";
|
echo "<script type=\"text/javascript\">withjQuery(function(){ $('tr').click(function(){window.location=$(this).find('a').attr('href');}).hover(function(){\$(this).toggleClass('hover');}); });</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user