Update... 29.8.13 The
$(document).on("click", ".setStamp", function ()
works just fine.
On testing I find that one of the actions within that click block
$('.setStamp').addClass('fake');
no longer works. This 'fake' class is a simple toggle override used...
if ($('.setStamp').is('.fake')) { resize-elements; $('.setStamp').removeClass('fake'); }
else { $(this).toggleClass('large'); $container.isotope('reLayout'); }
If I set it using:
$(".arrow_in").click(function () { $('.setStamp').addClass('fake'); }
It is fine. Comments?
___end Update
I am using Masonry-Isotope as a language dictionary interface where tiles are the first layer word definition. Simple eg: tile-a is the word 'test' with a synonym link 'exam'. Clicking exam loads a new definition in a corner-stamp (div float:right) = "A set of questions evaluating [link]skill[/link]".
Clicking the sub-link 'skill' uses the same class trigger as the top-level link 'exam' but... it fails to load.
Example here:http://www.buddhamind.info/br/innerLink.htm
CODE:
<link rel="stylesheet" href="style.css" />
<script src="jquery.min.js"></script>
<script src="jquery.isotope.min.js"></script>
<div id="container" class="clickable clearfix">
<div id="stamp" class="corner-stamp"><BR><center>tile<BR>
<span style='background-color:black;color:white;cursor:pointer'> link </span>
<BR>data<BR><BR>seen<BR>here</center></div>
<div class="element a" data-pali="Janaka-kamma" data-category="a">
<div class="number">180</div>
<div class="name"><button id=LINK class=setStamp>LINK</button></div>
</div>
</div>
<script>
$(".setStamp").click(function () { // click tile links..... MANY of these
$("#stamp").load($('#'+$(this).attr("id")).html()+'.htm'); // load file ID.htm
$('.setStamp').addClass('fake'); // fake class to stop 'large' resize
$('.corner-stamp').removeClass('noStamp'); // show stamp
$('#closeStamp').addClass('stampOn'); // stamp avoided by tiles
$('.corner-stamp').addClass('corner_wide'); // widen stamp
$('.corner-stamp').removeClass('corner_content');
$('.arrow_in').addClass('arrow_vis'); // show arrow_in.png
$('.arrow_out').removeClass('arrow_vis'); // hide arrow_out.png
$container.isotope('reLayout'); });
</script>
Two questions: Can it work? What will make it work?
I hope all this makes sense.