Answer the question
In order to leave comments, you need to log in
How to make it so that when you hover over one element, another appears?
Good afternoon.
I need to make an effect like in the menu on the right https://www.euconsult.md/pervayaa
Here is my markup
.navigation#js-navigation
.navigation__list
li
a(href="#js-reimbursabile") Финансы
span.circle
li
a(href="#js-history") История
span.circle
li
a(href="#js-footer") Контакты
span.circle
let navigationLi = $('#js-navigation li');
navigationLi.on('mouseenter', function(){
if(!$(this).hasClass('active')){
$(this).find('a').addClass('active');
}
});
navigationLi.on('mouseout', function(){
if(!$(this).hasClass('active')){
$(this).find('a').removeClass('active');
}
});
Answer the question
In order to leave comments, you need to log in
I change (\d\d) to $1., but brackets are saved.
(\d\d)
Try
instead \((\d+)\)
.
I got it like this
var str="(01) [Ляпис Трубецкой] Золотая Антилопа";
var pattern='\\((\\d\\d)\\)\\s*([^\\]]+\\])\\s+([А-Яа-яA-Za-z]+\\s+[А-Яа-яA-Za-z]+)';
var match=str.match(pattern);
console.log(match[1]+"."+match[3]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question