Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Not really an issue] Kwicks destroys "badly" under xxx pixels window's size #58

Open
guilmanu opened this issue Aug 24, 2016 · 5 comments

Comments

@guilmanu
Copy link

Hi,
first : apologize for my poor english
I use kwicks. Works fine !
I managed a way so as kwicks is unactive when browser windows is resized under xxx pixels wide.
The thing is that li.slide-kwicks keep on having left and width attributes.
That for, I tried to add a $('.slide.kwicks').width(""); action when window is resized but
when resizing, attributes are back again (the idea was to control appearance of the slider with cssc mediaqueries), making things going wrong

You can see the code I wrote here : http://spip.pastebin.fr/47581

Thanks +++ in advance

@furiousgreencloud
Copy link

furiousgreencloud commented Mar 7, 2017

I'm having this issue to, I want too switch kwicks off for a mobile/responsive design, it's subornly adding the li.panel style="left:86px;width:82px;"

even after $('li.panel').kwicks('destroy');

some thing like:

$('.kwicks').kwicks({
maxSize : '600px',
behavior: null
});

or
$('.kwicks').kwicks({
maxSize : '600px',
behavior: off
});

or just

$('.kwicks').stop();

would be great.

@jmar777
Copy link
Owner

jmar777 commented Mar 9, 2017

@furiousgreencloud Have you tried calling destroy on the container element (the same one you initialized with)? $('.kwicks').destroy() should be removing all inline styles from the panels already (https://github.com/jmar777/kwicks/blob/master/jquery.kwicks.js#L176):

destroy: function() {
	return this.each(function() {
		var $this = $(this),
			kwick = $this.data('kwicks');

		if (!kwick) return;

		kwick.destroy();
	});
}

Can you reproduce this in a jsfiddle/jsbin/etc.?

@guilmanu
Copy link
Author

guilmanu commented Mar 9, 2017

@furiousgreencloud : this works for me

http://spip.pastebin.fr/49535

@furiousgreencloud
Copy link

hi @jmar777, i'll try make you a fiddle, have a look at my pull request (#60) that's what i'm using for now.

@guilmanu
Copy link
Author

Hi, something wrong with destroy ?
I attempt to "destroy()" kwicks when window's size is under xxxpx.
Works fine except browser needs to refresh the page so thats kwicks is really "destroyed" (see attached file).
Am I doing something wrong ?
kwicks
Thanks for your expertise ;-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants