Robb Hill
asked on
hiding a div tag - not working
I have the following code. It is some to hide a div based on a value in my model...but it seems to hide it all the time...something must be wrong with the syntax.
Here is the code:
This should only hide the dive tag when the model contains that value. It does hide it...but it also hides it when it doesnt contain that value.
I am using built in bootstrap to change the class...but a display none approach is fine as well.
Thanks
Here is the code:
<div class="step-content">
<div class="@(Model.SiteName.Contains("subscribersite_")?"hidden":"step-pane active sample-pane alert")" data-step"1">
This should only hide the dive tag when the model contains that value. It does hide it...but it also hides it when it doesnt contain that value.
I am using built in bootstrap to change the class...but a display none approach is fine as well.
Thanks
ASKER
when i render the html it indicates
<div class="hidden" data-step="1">
which is the html it should render since it does not contain subscribersite_
yet it still hides the div...
It hides div no matter what
<div class="hidden" data-step="1">
which is the html it should render since it does not contain subscribersite_
yet it still hides the div...
It hides div no matter what
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OR
The class not doing what it is supposed to do i.e. hide the div
In other words if SiteName contains subscribersite_ do you get this
Open in new window
And if SiteName DOES NOT contain subscribersite_ do you get thisOpen in new window
Are we dealing with a server side logic issue or a client side styling issue?