Skip to content

Commit

Permalink
fix jquery-rvnm-rtl.css 3 bugs
Browse files Browse the repository at this point in the history
imporve
  • Loading branch information
A1Gard committed Jan 14, 2021
1 parent c160948 commit f8f8854
Show file tree
Hide file tree
Showing 49 changed files with 34 additions and 29 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified Gruntfile.js
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified assets/css/font-awesome.css
100644 → 100755
Empty file.
Empty file modified assets/css/font-awesome.min.css
100644 → 100755
Empty file.
Empty file modified assets/fonts/FontAwesome.otf
100644 → 100755
Empty file.
Empty file modified assets/fonts/fontawesome-webfont.eot
100644 → 100755
Empty file.
Empty file modified assets/fonts/fontawesome-webfont.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/fonts/fontawesome-webfont.ttf
100644 → 100755
Empty file.
Empty file modified assets/fonts/fontawesome-webfont.woff
100644 → 100755
Empty file.
Empty file modified assets/fonts/fontawesome-webfont.woff2
100644 → 100755
Empty file.
Empty file modified demo/index-rtl.html
100644 → 100755
Empty file.
Empty file modified demo/index.html
100644 → 100755
Empty file.
7 changes: 2 additions & 5 deletions demo/jquery.min.js
100644 → 100755

Large diffs are not rendered by default.

Empty file modified dist/img/cb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/cw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/db.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/dw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/lb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/lw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/mb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/mw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/rb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/img/rw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified dist/jquery-rvnm-rtl.min.css
100644 → 100755
Empty file.
Empty file modified dist/jquery-rvnm.min.css
100644 → 100755
Empty file.
Empty file modified dist/rvnm.css
100644 → 100755
Empty file.
26 changes: 15 additions & 11 deletions dist/rvnm.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* rvnm - v1.1.1
* rvnm - v1.1.4
* Responsive vertical navigation menu
* https://github.com/4xmen/rvnm#readme
*
Expand Down Expand Up @@ -128,7 +128,11 @@
self.sizetrigger();

// add triger windows resize
$(window).bind('resize.rvnm', function () {
$window = $(window);
$window.on('scroll', function () {
self.sizetrigger();
});
$window.on('resize', function () {
self.sizetrigger();
});

Expand Down Expand Up @@ -176,7 +180,7 @@

});

// add click event to expandable link
// add click event to expandable link
$(document).on('click', '.rvnm-expandable > a', function (e) {
// check click only this element
if (e.target !== e.currentTarget)
Expand All @@ -187,7 +191,7 @@
return false;
}

// check is first level of li child
// check is first level of li child
// try to close other expanded items
if ($(this).parent().closest('.rvnm-collapseable').length === 0) {
// slide up first level ul of this
Expand All @@ -199,7 +203,7 @@

// add collapseable class to parent of link and remove expandable
$(this).parent().addClass('rvnm-collapseable').removeClass('rvnm-expandable');
// slide down first level ul
// slide down first level ul
$(this).parent().find('> ul').slideDown(300, function () {
// then use size triger
self.sizetrigger();
Expand Down Expand Up @@ -229,7 +233,7 @@
});


// add click event to collapseable link
// add click event to collapseable link
$(document).on('click', '.rvnm-collapseable > a', function (e) {
// check click only this element
if (e.target !== e.currentTarget)
Expand All @@ -256,22 +260,22 @@
$(this).toggleClass('rvnm-mobile-expand');
});

// on mouseenter when menu is minimal
// on mouseenter when menu is minimal
$(document).on('mouseenter', '.rvnm-navbar-box.rvnm-minimal li', function (e) {
// if menu is first level li
// if menu is first level li
if ($(this).closest('.rvnm-minimal-expand').length === 0) {
// show menu
$(this).addClass('rvnm-minimal-expand');
}
});
// on mouseleave when menu is minimal
// on mouseleave when menu is minimal
$(document).on('mouseleave', '.rvnm-navbar-box.rvnm-minimal li.rvnm-minimal-expand', function (e) {
$(".rvnm-minimal-expand .rvnm-collapseable ul").slideUp();
$(".rvnm-minimal-expand .rvnm-collapseable").addClass('rvnm-expandable').removeClass('rvnm-collapseable');
$(this).removeClass('rvnm-minimal-expand');
});

$(window).load(function () {
$(window).on('load',function () {
setTimeout(function () {
self.sizetrigger();
}, 100);
Expand Down Expand Up @@ -318,4 +322,4 @@

};

}(jQuery));
}(jQuery));
4 changes: 2 additions & 2 deletions dist/rvnm.min.js
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified nbproject/private/private.properties
100644 → 100755
Empty file.
Empty file modified nbproject/project.properties
100644 → 100755
Empty file.
Empty file modified nbproject/project.xml
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rvnm",
"version": "1.1.4",
"version": "1.2.0",
"description": "Responsive vertical navigation menu",
"main": "index.js",
"scripts": {
Expand Down
Empty file modified rvnm.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified screenshot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/cb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/cw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/db.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/dw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/lb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/lw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/mb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/mw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/rb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/img/rw.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/jquery-rvnm-rtl.css
100644 → 100755
Empty file.
Empty file modified src/jquery-rvnm.css
100644 → 100755
Empty file.
24 changes: 14 additions & 10 deletions src/jquery-rvnm.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@
self.sizetrigger();

// add triger windows resize
$(window).bind('resize.rvnm', function () {
$window = $(window);
$window.on('scroll', function () {
self.sizetrigger();
});
$window.on('resize', function () {
self.sizetrigger();
});

Expand Down Expand Up @@ -168,7 +172,7 @@

});

// add click event to expandable link
// add click event to expandable link
$(document).on('click', '.rvnm-expandable > a', function (e) {
// check click only this element
if (e.target !== e.currentTarget)
Expand All @@ -179,7 +183,7 @@
return false;
}

// check is first level of li child
// check is first level of li child
// try to close other expanded items
if ($(this).parent().closest('.rvnm-collapseable').length === 0) {
// slide up first level ul of this
Expand All @@ -191,7 +195,7 @@

// add collapseable class to parent of link and remove expandable
$(this).parent().addClass('rvnm-collapseable').removeClass('rvnm-expandable');
// slide down first level ul
// slide down first level ul
$(this).parent().find('> ul').slideDown(300, function () {
// then use size triger
self.sizetrigger();
Expand Down Expand Up @@ -221,7 +225,7 @@
});


// add click event to collapseable link
// add click event to collapseable link
$(document).on('click', '.rvnm-collapseable > a', function (e) {
// check click only this element
if (e.target !== e.currentTarget)
Expand All @@ -248,22 +252,22 @@
$(this).toggleClass('rvnm-mobile-expand');
});

// on mouseenter when menu is minimal
// on mouseenter when menu is minimal
$(document).on('mouseenter', '.rvnm-navbar-box.rvnm-minimal li', function (e) {
// if menu is first level li
// if menu is first level li
if ($(this).closest('.rvnm-minimal-expand').length === 0) {
// show menu
$(this).addClass('rvnm-minimal-expand');
}
});
// on mouseleave when menu is minimal
// on mouseleave when menu is minimal
$(document).on('mouseleave', '.rvnm-navbar-box.rvnm-minimal li.rvnm-minimal-expand', function (e) {
$(".rvnm-minimal-expand .rvnm-collapseable ul").slideUp();
$(".rvnm-minimal-expand .rvnm-collapseable").addClass('rvnm-expandable').removeClass('rvnm-collapseable');
$(this).removeClass('rvnm-minimal-expand');
});

$(window).load(function () {
$(window).on('load',function () {
setTimeout(function () {
self.sizetrigger();
}, 100);
Expand Down Expand Up @@ -310,4 +314,4 @@

};

}(jQuery));
}(jQuery));

0 comments on commit f8f8854

Please sign in to comment.