0

hi i am having trouble with resizing can't get id using $(this).attr("id")

<script type="text/javascript">
        $(document).ready(function() {
            $('.text_wrapper').resizable({
                onResize: function(e) {
                var id = $(this).attr("id");

                var parent = $(this).parent();
$('.wrapper').load('modules/web/process-sortable-size.php?height='+ e.data.resizeData.target.css('height') +'&width='+ e.data.resizeData.target.css('width') +'&id='+ id);
                },
                onStop: function(e) {
                }
            });
        });
    </script>
2
Contributors
4
Replies
6
Views
6 Years
Discussion Span
Last Post by cleggy1987
0

Well, you're calling resizable on the text_wrapper by class. So you're trying to get an id out of a class. I think you need a .each() loop, (jQuery). Either way, I'm pretty sure you need to loop through each dom element of class 'text_wrapper'.

Josh of http://www.StudioJosh.com

0

its on done now i cheated and added it in the mysql array lol working great :)

?>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#text_wrapper<? echo $id; ?>").resizable({
                onResize: function(e) {
                var id = "<? echo $id; ?>";
$('.wrapper<? echo $id; ?>').load('modules/web/process-sortable-size.php?height='+ e.data.resizeData.target.css('height') +'&width='+ e.data.resizeData.target.css('width') +'&id='+ id);
                },
                onStop: function(e) {
                }
            });
        });
    </script>
<?

thanks for your help anyway mate

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.