Answer the question
In order to leave comments, you need to log in
Why is there an instant redirect to the connect.ok.ru page when OKSDK.init is initialized?
Good evening guys! Help deal with this scourge!
I will make sharing posts in the social. networks, it came to classmates
I went to the dock, I use the function
OKSDK.init({
app_id: 'тут мой id приложения',
app_key: 'Тут ключ',
})
OKSDK.Widgets.post(null, {
popup: 'on',
silent: 'off',
attachment: JSON.stringify(params), // Данные для поста
})
Answer the question
In order to leave comments, you need to log in
You are trying to find neighbors for elements .q
- and they are not neighbors to each other, since each has a separate parent element .trigger
. So replace with .
In general, you can do it much easier:$(this).siblings()
$(this).parent().siblings()
const $q = $('.trigger .q').click(function() {
$q.not(this).next().slideUp();
$(this).next().slideToggle();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question