Skip to content

Instantly share code, notes, and snippets.

@filkinsteez
Last active December 20, 2015 01:39
Show Gist options
  • Save filkinsteez/6050853 to your computer and use it in GitHub Desktop.
Save filkinsteez/6050853 to your computer and use it in GitHub Desktop.
HTML generated by erb block
<div class="container">
<span class="i_connection" data-pos-x="175" data-pos-y="221" data-pos-width="110" data-pos-height="64" data-image=> </span>
<br>
<div class="image_panel">
<img alt="Un40eh5300inputs" src="http://s3.amazonaws.com/mymanual/images/images/000/000/005/large/UN40EH5300Inputs.jpg?1373419416" />
<div class='i_connection'></div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("span.i_connection").each(function() {
var pos_width = $(this).data('pos-width');
var pos_height = $(this).data('pos-height');
var xpos = $(this).data('pos-x');
var ypos = $(this).data('pos-y');
$(".tagged_box").css("display","block");
$(".tagged").css("border","5px solid red");
$('.i_connection').append('<div class="tagged" style="width:'+pos_width+'px;height:'+pos_height+'px;left:'+xpos+'px;top:'+ypos+'px;" ><div class="tagged_box" style="width:'+pos_width+'px;height:'+
pos_height+'px;" style="position:absolute;"></div>')
}); //END OF SPAN.CONNECTION ITERATION
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment