Elxn
asked on
Help Get Rid of jQuery Pluggin!
I'm using this pluggin: imgAreaSelect
The plugin works fine. However, I can't get the selection to go away when the plugin is removed from the page. It is put in the page via ajax, and the page content is updated via ajax too. But when the ajax fires and changes the content, the image area selection still shows on the page!
I tried using remove() to totally remove the div with the javascript code and all the related stuff, but that doesn't work.
Want to see what I mean? It will probably help to see whats up.
Go to this page: profile page
Hover your mouse over the profile picture and click the change profile pic button.
Upload a picture
Now you'll be on the screen with the plugin. Now to see the error click the "status" tab which is above the image you uploaded.
So you see my problem. Any clever ideas to help?
Thanks experts!
The plugin works fine. However, I can't get the selection to go away when the plugin is removed from the page. It is put in the page via ajax, and the page content is updated via ajax too. But when the ajax fires and changes the content, the image area selection still shows on the page!
I tried using remove() to totally remove the div with the javascript code and all the related stuff, but that doesn't work.
Want to see what I mean? It will probably help to see whats up.
Go to this page: profile page
Hover your mouse over the profile picture and click the change profile pic button.
Upload a picture
Now you'll be on the screen with the plugin. Now to see the error click the "status" tab which is above the image you uploaded.
So you see my problem. Any clever ideas to help?
Thanks experts!
ASKER
Hmm.. I'll give it a shot. But I thought of this already and didn't do it cause i figured the plugin would go away after the user moved the selection area once. So they'd then only get one modification of the crop area; that won't do.
But maybe this means it will be removed when they click the button to save their cropped picture.
Thanks, I'll try it out and see what happens!
But maybe this means it will be removed when they click the button to save their cropped picture.
Thanks, I'll try it out and see what happens!
ASKER
Okay I tried it.
It still persisted even doing it that way so it didn't solve the problem. Also the plugin didn't work anymore when i did it this way; it just showed the initial selection area but you couldn't move it around or change the dimensions of the selection.
Oh, i should say, if i put it in a document dot ready function it doesn't work at all; so i had to take out that encapsulating function to even get the selection area to show.
Any other ideas?
It still persisted even doing it that way so it didn't solve the problem. Also the plugin didn't work anymore when i did it this way; it just showed the initial selection area but you couldn't move it around or change the dimensions of the selection.
Oh, i should say, if i put it in a document dot ready function it doesn't work at all; so i had to take out that encapsulating function to even get the selection area to show.
Any other ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I figured it out myself. Should have seen this earlier. If i could reduce the points to 0 I would but I don't know if you can even do that.
So I'll let you moderators see what you think the points should be!
So I'll let you moderators see what you think the points should be!
Open in new window