Skip to content

Commit

Permalink
v1.1.25
Browse files Browse the repository at this point in the history
The menu command can now detect the active page and automatically add
an "active" class.
  • Loading branch information
FrediBach committed Feb 26, 2013
1 parent 3571835 commit fc8e1f4
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 16 deletions.
5 changes: 5 additions & 0 deletions css/jkit.css
Expand Up @@ -805,6 +805,11 @@ ul.dropdown a:visited { color: #000; text-decoration: none; }
ul.dropdown a:hover { color: #000; }
ul.dropdown a:active { color: #ffa500; }

ul.dropdown a.active:link,
ul.dropdown a.active:visited { color: #f33; text-decoration: none; }
ul.dropdown a.active:hover { color: #f00; }
ul.dropdown a.active:active { color: #ffa500; }

/* -- level mark -- */

ul.dropdown ul {
Expand Down
2 changes: 1 addition & 1 deletion events.html
Expand Up @@ -27,7 +27,7 @@

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript" src="jquery.jkit.1.1.24.min.js"></script>
<script type="text/javascript" src="jquery.jkit.1.1.25.min.js"></script>

<script type="text/javascript">

Expand Down
4 changes: 2 additions & 2 deletions index.html
Expand Up @@ -27,7 +27,7 @@

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript" src="jquery.jkit.1.1.24.min.js"></script>
<script type="text/javascript" src="jquery.jkit.1.1.25.min.js"></script>

<script type="text/javascript">

Expand Down Expand Up @@ -98,7 +98,7 @@ <h1><img src="images/jkit_logo.png" alt="jKit" title="jKit"></h1>
<!-- basics -->

<h2>Basics</h2>
<pre>&lt;script type="text/javascript" src="jquery.jkit.1.1.24.min.js"&gt;&lt;/script&gt;</pre>
<pre>&lt;script type="text/javascript" src="jquery.jkit.1.1.25.min.js"&gt;&lt;/script&gt;</pre>
<p class="info">Attach it to the whole body or any other element:</p>
<pre>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
Expand Down
2 changes: 1 addition & 1 deletion jkit.jquery.json
Expand Up @@ -7,7 +7,7 @@
"ui",
"widgets"
],
"version": "1.1.24",
"version": "1.1.25",
"author": {
"name": "Fredi Bach",
"url": "http://fredibach.ch"
Expand Down
11 changes: 0 additions & 11 deletions jquery.jkit.1.1.24.min.js

This file was deleted.

15 changes: 14 additions & 1 deletion jquery.jkit.1.1.24.js → jquery.jkit.1.1.25.js
@@ -1,7 +1,7 @@

// jQuery Plugin: jKit
// A very easy to use, cross platform jQuery UI toolkit that's still small in size, has the features you need and doesn't get in your way.
// Version 1.1.24 - 22. 2. 2013
// Version 1.1.25 - 26. 2. 2013
// http://jquery-jkit.com/
//
// by Fredi Bach
Expand Down Expand Up @@ -284,6 +284,9 @@
'speed': 250,
'easing': 'linear',
'pos': 'after'
},
'menu': {
'autoactive': 'no'
}
}
};
Expand Down Expand Up @@ -1931,6 +1934,16 @@

case 'menu':

if (options.autoactive == 'yes'){

var path = window.location.toString().split('#')[0].split("/");

$that.find("a").filter(function() {
return $(this).attr("href") == path[path.length-1];
}).addClass(s.activeClass);

}

$that.find("li").hover(function(){

$(this).addClass("hover");
Expand Down
11 changes: 11 additions & 0 deletions jquery.jkit.1.1.25.min.js

Large diffs are not rendered by default.

0 comments on commit fc8e1f4

Please sign in to comment.