jscrollpane does not work with <br> and <br/>

閲覧: 165 回
最初の未読メッセージにスキップ

MarkusDittrich

未読、
2011/02/10 13:59:052011/02/10
To: jscrollpane
i have made a website with html, css, php AND jscrollpane:
http://www.mool-productions.com/website/index.php
if you open the site, you will see, that the <br/> is not working. If
I look in FireBug, i can't find the tag. If I add in Firebug the <br /
> tag, it works.
Any ideas?

Thanks a lot,
Markus

Kelvin Luck

未読、
2011/02/11 6:09:182011/02/11
To: jscro...@googlegroups.com
Hi,

That's very strange! I can reproduce here:
http://www.jsfiddle.net/j3nE3/

I'll look into it and see where the <br/>'s are being stripped out...

Thanks,

Kelvin :)

MarkusDittrich

未読、
2011/02/11 13:27:242011/02/11
To: jscrollpane
Hi Kelvin!

A business partner of me, Martin Homolka, have done a work around. We
are not sure, if it work's on all browsers and in any situations. But
maybe it helps.... I'm interested if you have a better fix for this
bug.
It's in code line 104

// fix for <br/> issue
(workaround!)
var htmlContent = elem.html();
elem.html(''); // avoid
possible id clashes
pane = $('<div
class="jspPane" />').css('padding',
originalPadding).html(htmlContent);
// end
// original:
//pane = $('<div
class="jspPane" />').css('padding',
originalPadding).append(elem.children());
> > Markus- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Kelvin Luck

未読、
2011/02/13 8:06:232011/02/13
To: jscro...@googlegroups.com
Hi,

Thanks for the suggested solution. I looked into the problem in more
detail and realised that the simple solution is to wrap the contents of
the jScrollPane within another element (such as a <p> tag or even
another <div>.

http://www.jsfiddle.net/j3nE3/2/

Note that probably a set of styled <p>'s (or possibly a <ul> of <li>'s)
is probably a more semantically correct way of marking up your content
anyway.

Cheers,

Kelvin :)

MarkusDittrich

未読、
2011/02/16 7:00:252011/02/16
To: jscrollpane
Thanks!
> >> - Zitierten Text anzeigen -- Zitierten Text ausblenden -

Kelvin Luck

未読、
2011/02/20 12:21:102011/02/20
To: jscro...@googlegroups.com
Hi,

Someone has also made a suggestion on the bug I issued on github for
this which might mean that I can make it work with your original markup.
Watch https://github.com/vitch/jScrollPane/issues/closed#issue/49 for
updates...

Cheers,

Kelvin :)

全員に返信
投稿者に返信
転送
新着メール 0 件