0

I want to use Jquery to implement a page that contains js from quotemedia.com. After I embed the js into the sortable, when I drag and drop the element that contains the js, it jump to full page display.

This happens under Firefox, IE is ok.

The running code is here: http://jsfiddle.net/dodoflying/9BkJ5/ Please use firefox to drag and drop element shopping to see the problem.

Is is a bug under firefox? How could I solve this problem?

Thanks in advance!

Don

2 Answers2

0

I don't know if it's a bug on FF or a bad implementation in IE, anyway if you don't have a problem put the JS in a seperate html and include the html page in an iframe you'll still see the iframe reloaded but not the whole page, refer for this link for more info.

iFrame reload on sortable

Edit: by the way, you don't need to connect the list to itself...it's already connected so this is not needed:

$( ".column" ).sortable({
    connectWith: ".column"
});

Now back to the main issue, as you can see the iframe (or your code) will be reloaded each time you change it's order in the dom tree, so instead of using sortable..maybe you will be able to come up with a similar effect by absolutely position these DIVs and change their position (CSS top & left using JS) when dragging them but this would require A LOT of work.

Community
  • 1
  • 1
ifaour
  • 38,035
  • 12
  • 72
  • 79
  • Thank you for your kindly suggestions! Actually I must use Jquery sortable because my work will based on other people work. They use sortable already. I don't want to touch their codes. –  Dec 15 '10 at 19:59
  • I found that it could be solved by removing the js using Jquery. –  Dec 16 '10 at 16:39
  • Of course removing the JS will fix the problem, this is what i said "as you can see the iframe (or your code) will be reloaded each time you change it's order", Now If you don't need the shopping element (that causing the problem) then go for it. – ifaour Dec 18 '10 at 10:26
0

I just found it could be solved by using Jquery to remove the following javascript

<script src="http://app.quotemedia.com/quotetools/miniCharts.go?webmasterId=93004&amp;symbol='.$symbol_chart.'&amp;toolWidth=660&amp;chhig=130&amp;chbg=ffffff&amp;chln=333333&amp;chgrd=D5DDE8&amp;chxyc=2B5286&amp;chtcol=2B5286&amp;chbgch=ffffff&amp;chbdr=2B5286&amp;chfill=ee5E739B&amp;chfill2=8BA9E0" type="text/javascript" language="javascript"></script>

Under both Firefox and IE, it is ok.