Hi there!
I'm trying to play around with example from here:
And returning JSONP from my PHP script:
<?php
header("Content-type: text/javascript");
//Parameters in the request from Rapportive to our Raplet
$callback = isset($_GET['callback'])? $_GET['callback'] : "cb";
?>
<?=$callback?>({
"status": 200,
"css": "h2.name { color: grey; }\n .collapsed { white-space: nowrap; overflow: hidden; }", "js": "$('h2.name').click(function(){ $(this).text('You clicked me!'); });", "sections": [
{
"expanded_html": "<h2 class='name'>Rahul Vohra</h2><p>Lifetime value: $1,000,000!</p>",
"collapsed_html": "<div class='collapsed'>$1,000,000</div>"
}
]
})
I've figured out that display of expanded or collapsed HTML depends on browser's viewport height and total height of Rapportive widget.
At some point I thought I broke smth. and spent a whole day trying to force Rapportive to display my collapsed version by default & expanded on hover event.
My question is as following:
- Is there any way to force display of collapsed version only which does not depend on browser's/rapportive widget height?
p.s. And probably you should somehow stress this thing with height behavior in your docs, because it really confuses at the beginning and may lead to huge loss of time