Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="<? bloginfo('stylesheet_directory'); ?>/js/jquery.freetile.min.js"></script>
- <script>
- jQuery(document).ready(function() {
- for (i=0;i<40;i++) {
- var w = 128 * (parseInt(Math.random() * 3) + 1) - 1,h = 128 * (parseInt(Math.random() * 3) + 1) - 1;
- jQuery('article').width(w).height(h);
- }
- jQuery('#content').freetile();
- selector: 'article';
- animate: true;
- elementDelay: 10
- });
- </script>
- for (i=0;i<40;i++) {
- var w = 128 * (parseInt(Math.random() * 3) + 1) - 1,h = 128 * (parseInt(Math.random() * 3) + 1) - 1;
- jQuery('article').width(w).height(h);
- }
- for (i=0;i<40;i++) {
- var w = 64 * (parseInt(Math.random() * 3) + 1) - 1,
- h = 48 * (parseInt(Math.random() * 3) + 1) - 1;
- //this part here is where the error happens.
- //you're asking to set the width and height to every element <content> on each iteration.
- //so on the last iteration, all the elements have the same width/height
- jQuery('content').width(w).height(h).appendTo('article');
- }
- jQuery(document).ready(function() {
- for (i=0;i<40;i++) {
- var w = 64 * (parseInt(Math.random() * 3) + 1) - 1,
- h = 48 * (parseInt(Math.random() * 3) + 1) - 1;
- $('<div class="content" />').width(w).height(h).appendTo('body');
- }
- });
- // What are you trying to set the width/height of?
- jQuery('').width(w).height(h)
- jQuery('#content .selector-for-tiled-divs').width(w).height(h)...
Add Comment
Please, Sign In to add comment