1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says

Hi everybody!

I am facing a problem with jCarousel used on threaded comments in the development of the WP version of my HTML theme. There are some clever guys out there so I hope they stumble upon this thread sometime!
I found out that the ul for the nested comments is called “children” and I apparently cannot add the jCarousel class to the ul class, therefor the nested comments are not counted as jCarousel items and the image scroller does not work properly.
I got e.g. 2 comments and 3 replies each jCarousel still thinks I only got 2 comments not 8, so the comment list is too long to be shown as a whole but for jCarousel it is too short to enable the arrows to scroll.

Does anyone know a way to solve this? And if not, would you rather get rid of threaded comments or get rid of the comment scroll and just display them the normal way?

Thank you so much for your help!
GC

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

I apparently cannot add the jCarousel class to the ul class, therefor the nested comments are not counted as jCarousel item

Why not? Can’t you do something like $(’#comment-container ul.children’).addClass(‘jCarousel’) before jCarousel initializes?

1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says


I apparently cannot add the jCarousel class to the ul class, therefor the nested comments are not counted as jCarousel item
Why not? Can’t you do something like $(’#comment-container ul.children’).addClass(‘jCarousel’) before jCarousel initializes?

That did not come to my mind at all, first thing I will do in office tomorrow! Thank you so much for the help!

All the best,
GC

1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says

Oh man, it does not work. I tried some other combinations as well like: <script>$("h1").addClass("marginbottom80");</script> (marginbottom80 obviously should add 80 margin bottom px) but Firebug tells me nothing happens. What can I do? :/ Anybody’s help is appreciated!

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

Oh man, it does not work. I tried some other combinations as well like: <script>$("h1").addClass("marginbottom80");</script> (marginbottom80 obviously should add 80 margin bottom px) but Firebug tells me nothing happens. What can I do? :/ Anybody’s help is appreciated!

Make sure you do that on $(document).ready or place that script at the bottom of the page. Otherwise, it should work.

1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says


Oh man, it does not work. I tried some other combinations as well like: <script>$("h1").addClass("marginbottom80");</script> (marginbottom80 obviously should add 80 margin bottom px) but Firebug tells me nothing happens. What can I do? :/ Anybody’s help is appreciated!
Make sure you do that on $(document).ready or place that script at the bottom of the page. Otherwise, it should work.

Thanks again for the answer! Let me be silly, I’m more the visual person than the programmer, but you mentioned I had to place it before jquery initializes, but at the bottom of the page? Like where exactly? But still in the right? And it should work with jQuery 1.4.4. still or do I have to get 1.5? I bake cookies if I can get this to work :/

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

The order should be jquery, jcarousel, addclass snippet, initialize jcarousel. It should work with pretty much any version of jquery


<head>
<script src="jquery.js">
<script src="jcarousel.js">
</head>
<body>
content goes here
...

<script>
$(document).ready(function() {
    $('#comment-container ul.children').addClass('jCarousel');
    $('.jCarousel').jcarouselint({options}); //or whatever the exact code is
});
</script>

</head>
1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says

I just cannot get it to work :( I tried putting this

<script> $(document).ready(function() { $('.entry-title').addClass('marginbottom80'); }); </script>

At the veeery bottom of the page right before the end body tag. I thought this really is not too complicated so it should work and add the marginbottom80 class to the WordPress post titles. But it does not.
I will try again since I really cannot understand why it won’t work, and maybe I hire somebody to do it for me.
In the end I hope we don’t have to change the layout of the comments from the HTML compared to the WP version, maybe it will not be approved then :/

1149 posts
  • Affiliate Level 1
  • Author Level 3
  • Beta Tester
  • Collector Level 2
+3 more
fillerspace
says

Maybe you could send me a link to the page so I can take a look at it. Usually when something isn’t working for me, it’s something silly like a misplaced semicolon.

1141 posts
  • 5 Years of Membership
  • Affiliate Level 1
  • Author Level 6
  • Collector Level 4
+3 more
KarmaThemes
says

I sent you an email, thank you very much!

by
by
by
by
by
by