Closed gatkinsNZ closed 9 years ago
Thanks for the issue, I'll check it out. And will be better if you provide your HTML and parameters of calling
Example below. The only difference to the sample code in the readme is the child p element
<ul class="list1">
<li>
← you can swipe this bit <p>!but this bit here won't swipe!</p>
</li>
</ul>
var a2 = Swiped.init({
query: '.list1 li',
right: 400,
onOpen: function () {
this.destroy(true)
},
onClose: function () {
console.log('close')
}
});
Hi. This is great functionality, however I have come across the fact it doesn't work with child elements. While the parent element is slidable/movable, the inner elements aren't. Therefore, if you have an inner element that takes up most the parent element then this doesn't work.
This is due to the fact the touch event is binded to the document, not the specific element, and instead the delegate(event, cbName) method that is fired filters for just the parent elements name.
Any reason the events are not binded to the specific target element/s?