Hi,
I am working on a drupal website for my personal portfolio, the website itself is in a grid format and the nodes or articles are of varying heights and fixed widths.
The height value itself is stored in each node:
The DOM for each node is set up as follows:
The problem I am having is in creating a caption overlay which slides up when the user hovers over a node. As the nodes are varying heights I have decided to call the height value and calculate how much the caption should move up by.
At the moment I have this in the head of the node.tpl.php file:
This works perfectly for the content immediately loaded onto the page, however I have an endless page and if I load new content the jQuery does not work. I guess because the new content is not bound to the javascript.
I cannot for the life of me work out how to rebind the scripts to the new content.
I have tried the following:
So moving up the tree and then looking for classes that contain the word 'cover', however the result of this is that it takes the node height <?php print $node->field_imgheight[0]['value']; ?>; value from the last node loaded...instead of it's unique value.
I know its a long winded question, but if anyone has any ideas about how to go about correcting this, or has any input or futher reading, then that would be amazing. I would really love to see this site go live, I've been chipping away at it for months now....
Thanks for you time
Ross