Welcome Guest, Not a member yet? Register   Sign In
jQuery Image manipulation

Hello, i would to rotate a image (or flip or else) by clicking on a icon. I'm testing jQuery, but it will not work.

Have anyone a snipplet or a other good example to load a method (in model) and exchange the image ?

Hi, i made this example to rotate the image. That works fine, but the rotated image will not be shown in the browser. I have the old - unrotate image... Whats wrong.


<title>Simple Ajax Messaging</title>

$(document).ready(function() {
    $('#submit').click(function() {
          url: '<?php echo site_url('message/image/ajax/1169549_53885002.jpg') ?>',
          success: function(data) {
            $('#grafik').attr('src', '<?php echo base_url().'bilder/' ?>'+data);
            //alert('Load was performed.');


<img src="&lt;?php echo base_url().'bilder/1169549_53885002.jpg'?&gt;" width="300" id="grafik" />

<h1>Simple Ajax Messaging</h1>
<div id="form">
    &lt;input type="text" id="message" name="message" /&gt;
    &lt;input type="submit" id="submit" name="submit" value="submit" /&gt;
<div id="content">
&lt;?php $this->load->view('messages_list') ?&gt;

I get the URL of the Picture, that will be rotatad back... from the ajax function any ideas ?

have anyone 5 minutes to check my javascript (jquery) code ?

What does "will not work" mean? Have you tried firebug or the javascript error console to do any debugging at all? What was the result of that?

the image will rotated, the request is okay too, but the rotated image will not be updated.

// When Image ist rotated, then show the same picture again (reload)
$('#grafik').attr('src', '&lt;?php echo base_url().'bilder/' ?&gt;'+data);

This should update the picture or not ? i load the same image like before.

Theme © iAndrew 2016 - Forum software by © MyBB