The Search for a Better Accordion



Show first post

46 replies

Userlevel 7
Badge +5

@Bfarkas - Yeah, that was the point of having everything in a parent div with the ID  #accord. I only wanted to target objects inside that div. I may not have been unique enough.

I could test the same code and change the ID and make it more quirky to see if that helps but I honestly like the use of the font-awesome chevron better anyways. 

Userlevel 7
Badge +3

Yup, accord I wouldn’t consider unique enough cuz people will do similar, I’d start with it, agree with the font awesome as well. Thinking about others coming and adding to platform too in multi-admin environments. 

Userlevel 4

@gstager The update worked like a charm! Thanks.

Userlevel 7
Badge +5

The update worked like a charm! Thanks.

Awesome!

Thanks for confirming.

Userlevel 7
Badge +5

@lrodman My hamburger menu looks like that as well.

 

It was something subtle that I didn’t notice for some time. I posted some updated code in a pdf that will take care of that.

Fixed!

 

I was also having the issue that this made all my h2 forced white text, which was undesirable in some widgets.

 

Does this problem persist? Or is it fixed.

Userlevel 7
Badge +5

I was also having the issue that this made all my h2 forced white text, which was undesirable in some widgets.

Does this problem persist? Or is it fixed.

In my post I described all the updates taken care of in the new code.

It does include the h2 tag

 

Userlevel 7
Badge +5

Fabulous! You’re the best!

@gstager : I am trying to add hyperlinks to the text in accordion but I cannot click on it. Is it possible to do the expand/contract just by click on heading or on the drop down button on right?

Userlevel 7
Badge +5

@hsingh - This request was actually brought up earlier in the thread.

Take a peek at the first page of comments and look for the post from @Allan who had done a little digging into exactly what you are asking for.

 

Userlevel 4

I copied and pasted exactly what was provided to test, and it did not work at all? Any suggestions?

 

Userlevel 7
Badge +5

@Scott Foster - My code assumes placing the CSS in the custom styles area and the HTML in an HTML/WYSIWYG widget for a page.

If you are trying to go with training materials - you would need to put the CSS in the course player area. I have not tried that so I am not 100% sure of the result at this point. 

Looks like you have volunteered to be the guinea pig on that.

Let me know how that plays out.

 

Userlevel 4

@Scott Foster - My code assumes placing the CSS in the custom styles area and the HTML in an HTML/WYSIWYG widget for a page.

If you are trying to go with training materials - you would need to put the CSS in the course player area. I have not tried that so I am not 100% sure of the result at this point. 

Looks like you have volunteered to be the guinea pig on that.

Let me know how that plays out.

 

It looks/functions correctly in the Course Description area but in the User view it doesn’t? Any ideas why the difference?

Looks perfect here.

 

But not in the ‘real world’…

 

Userlevel 4

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!

Userlevel 7
Badge +5

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!

Hmm… I didn’t realize that our uploads expired but here it is.

As for the differences above - I am not sure. It makes me think of areas like certificates or email notifications where it seems rules are a bit different and so not everything works or works as expected.

Does anyone know how to add a responsive background image to the accordion?

Thanks 

Userlevel 4

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!

Hmm… I didn’t realize that our uploads expired but here it is.

 

Thank you! I will review and compare with my existing code. 🤞🏻

Userlevel 4

I still can’t get this to work in User View. Has any one else had luck with this?

Userlevel 7
Badge +5

I still can’t get this to work in User View. Has any one else had luck with this?

I finally have an opportunity to use this in our site!  It works BEAUTIFULLY in our sandbox, but in production I can’t get the chevron to appear. 

I have no idea why either.  Both instances have the same exact CSS.  @gstager, have you encountered CSS working perfectly in the sandbox and not in production? You have any recommendations for troubleshooting?

Userlevel 7
Badge +5

@Annarose.Peterson - Hmm… We don’t have a sandbox to play with so I cannot speak from XP there.

As for the chevron… I think the first place I would look is for any other CSS in production that might be interfering.

Beyond that - it gets a bit more challenging.

Like do we have a missing angle bracket somewhere that is breaking things?

You might copy/paste all the production CSS into VS Code or something and try a search for rules that touch the chevrons.

Maybe try adding some page or widget specific ID/classes to the CSS to isolate it better.

Just some quick rambling thoughts.

Userlevel 7
Badge +5

@Annarose.Peterson - Hmm… We don’t have a sandbox to play with so I cannot speak from XP there.

As for the chevron… I think the first place I would look is for any other CSS in production that might be interfering.

Beyond that - it gets a bit more challenging.

Like do we have a missing angle bracket somewhere that is breaking things?

You might copy/paste all the production CSS into VS Code or something and try a search for rules that touch the chevrons.

Maybe try adding some page or widget specific ID/classes to the CSS to isolate it better.

Just some quick rambling thoughts.

Thank you so much @gstager!  You are a rock star!  Went through all the codes and it looked great and there was nothing else that I could see that would impact the chevron.  It was totally in my HTML code.  I was missing a class. 🤦🏻🤣

Thank you so much made my day. @gstager 

Reply