your code is executing too soon, on document.ready. After
document.ready, exhibit's code takes time to run and render the tags
that contain the exhibit-flowFacet-body class. You are trying to
modify that tag before it exists.
You may be able to fix this by binding to certain exhibit specific
events---such as onShow or onDataLoad---that are triggered as exhibit
renders the page. It will be a while before I have time to find the
full list of events. A sloppy alternative would be to wait a small
interval using setTimeout before invoking your modification.
On 12/14/2011 9:42 AM, kasaba wrote:
Hi, fellows
I use exhibit code from trunk.
I want to change css of div with jquery. But the following code is not
executed correctly for exhibit generated tags. When I put in html my
tag(not exhibit generated) i.e<div class="exhibit-flowingFacet-body">
some data</div>, jquery change its class correctly.
<script type="text/javascript">
$(document).ready(function() {
$(".exhibit-flowingFacet-body").removeClass().addClass("exhibit-
facet-body");
});
</script>
In facet.js there's a function
Exhibit.FacetUtilities.constructFlowingFacetFrame = function(forFacet,
div, facetLabel, onClearAllSelections, uiContext, collapsible,
collapsed) {
div.className = "exhibit-flowingFacet";
var dom = SimileAjax.DOM.createDOMFromString(
div,
"<div class='exhibit-flowingFacet-header'>" +
((collapsible) ?
"<img src='" + Exhibit.urlPrefix + "images/
collapse.png' class='exhibit-facet-header-collapse' id='collapseImg' /
" :
"") +
"<span class='exhibit-flowingFacet-header-title'>" +
facetLabel + "</span>" +
"</div>" +
"<div id='frameDiv'><div class='exhibit-flowingFacet-body'
id='valuesContainer'></div></div>"
);
and I tried to change<div class='exhibit-flowingFacet-body'
id='valuesContainer'> to<div class='exhibit-facet-body'
id='valuesContainer'> but it doesn't work
Any ideas?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "SIMILE
Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.