Вот этот аккордеон я скопировал с одного сайта, его код на моей странице конфликтует с другими скриптами, написан он как-то немного замудренно, не могли бы переделать его на обычный $(document).ready вместо безимянной функции.
(function() { new KinTooltip('js_content'); var title = $('.js_title'), content = $('.js_content'); content.on('click', '.js_title', onTownsClick); function onTownsClick() { if ($(this).parent().hasClass('towns_open')) { close(); } else { open($(this)); } } function open(e) { close(); e.next().slideDown(200); e.parent().addClass('towns_open'); } function close() { title.each(function(){ $(this).parent().removeClass('towns_open'); $(this).next().slideUp(200); }); }})();
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
ilyas
Вот этот аккордеон я скопировал с одного сайта, его код на моей странице конфликтует с другими скриптами, написан он как-то немного замудренно, не могли бы переделать его на обычный $(document).ready вместо безимянной функции.
А вот разметка аккордеона
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.