0

I am attempting to load a folder of images which are being resized and loaded with PHP. I am now trying to display unique textbox where the value of the slider will be display as is changes.

Below is my attempt at this. I have everything working except the unique boxes linking correctly to each slider. Also here is the live page which i just added HERE! http://go3dexpansion.com/showings/generatesim/

* By the way the live page above may change as I am still working on this as we speak! :) **

<script>
$(function() {
    $(".slider").each(function() {
        $(this).slider({ 
            value:0,
            min: 1,
            max: 360,
            step: 1,
            slide: function( event, ui ) {
                var v = this.id
                $(v).each(function(){
                    $(this).val( ui.value );
                });
            }
        });
  });
});
</script>
<?php 
    $dirname = "panos/";
    $images = glob($dirname."*.jpg");
    foreach($images as $image) {
        echo '
        <img src="resize.php?w=450&amp;img='.$image.'" />
        <input type="text" id="',$image,'" />
        <br />
        <div style="width:450px" id="',$image,'-slider" class="slider"></div>
        ';
    }
?>

1 Answers1

0
<input type="text" id="',$image,'" />

should be

 <input type="text" id="'.$image.'" />
  • still did not work. I have checked the elements when i run it live and the id's were still filling in properly. It just seems that "this.id" is not returning the proper vaule is there anything else i can do? – GO3DExpansion Mar 06 '13 at 15:12