This project has moved. For the latest updates, please go here.

Toggling SPDisplayRelatedInfo content

Jul 24, 2013 at 10:52 PM
I'm attempting to toggle SPDisplayRelatedInfo content. Calling the function works nicely and displays as I would like, however I am unable to hide/remove the <div id="SPDisplayRelatedInfo_columnname"> block when I change my toggle control, which is driven by a option list (e.g. option A & B will display the related info, option C should not)

I am using an if/else clause to evaluate the selected option and that element works, i.e. the correct conditional code fires and related info changes, but with my Option C 'else' clause, despite using a jquery selector which I have tested and works, when I try to use this selector with the jquery .fadeOut()/.remove() methods the SPDisplayRelatedInfo block is automatically reinserted after the .fadeOut()/.remove() method.

I can understand that the SPDisplayRelatedInfo function would still pull in related data for my Option C, but cannot understand why it's not allowing me to hide the div.

Is it my code or a specific design feature?
Jul 26, 2013 at 1:10 AM
You should be able to hide or display the SPDisplayRelatedInfo content as simply as:

$("#SPDisplayRelatedInfo_columnname").hide() or .show()

I make the ids simple and easily identifiable for just such a use case.