views:

148

answers:

2

Hi

To resolve a jQuery slideDown/Up problem, I had to change one line in the jQuery file.

I changed line 5738 from this.elem.style.display = "block"; to this.elem.style.display = "inline-block";

The block attribute messed up my lists when using slideDown/Up/Toggle. slideDown changes my list from display:inline to display:block during execution, and then back to display: inline again. It would be much better if it was inline (or inline-block) all the way. Is there a way to override the value stated above from my html page, or do I have to stick with my modified jQuery file?

It would be nice if I could override the style attribute only when I perform $('.gallery_container li:gt(4)').slideToggle();

Here's the code: http://90.230.237.71/gandhi.html

A: 
Pez Cuckow
If you would look at the code, you would see that I'm hiding some elements. If I would use !important, then I wouldn't be able to hide the elements.
MrAwesome
Answer #2. The thought crossed my mind. But if I did like that, there would be large spacing between the first ul and the second. I don't like that.
MrAwesome
Pez Cuckow
+1  A: 
  $('#as_test').slideUp(300,function(){ 
      $('#your_lists_id').css('display','inline');
    //$('#your_lists_id').css('display','inline-block');
  });

There is a callback function for slideUp and slideDown , it gets called once the the slideUp or slideDown finishes its job , and hence you can easily give whetever you wanna do once your slide action is over.

Ashin