Home >Web Front-end >JS Tutorial >Solving problems caused by different Jquery versions_javascript skills

Solving problems caused by different Jquery versions_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:20:061009browse

This is the most perfect work written in the past three months. It uses JS to implement a drag and drop sorting. The rendering is as follows:
Solving problems caused by different Jquery versions_javascript skills
When I first entered the project, I had such a drag and drop implementation. I have no idea at all. Please ask my teacher to tell me that this is impossible. I felt very sorry at the time and planned to use traditional methods to achieve it. I was thinking about the traditional way and felt I had plenty of time, so I came back to the idea of ​​dragging. It finally happened. In fact, I am not showing off this (of course, if you are interested, you can contact me at QQ907087894, I will organize the demo and upload it to the resource center), what I want to say is the following.
While I was implementing it, my senior sister helped another partner write a demo of a traditional solution, and he was sorting the modifications. When I demonstrated it on her machine, I felt very shocked at the time. With the slide of her mouse, I walked through the code and looked at the long chain of JS, and I suddenly admired it. At that time, I thought that after the project was completed, I would study her carefully.
Solving problems caused by different Jquery versions_javascript skills
2 months later, the wait is here, free time. Due to my unfamiliarity with JS, I struggled to understand the code. When I was running it, a bug flew in. When moving, it keeps saying there are no options.

Copy code The code is as follows:

for(var j = 0; j < div_count; j ){
if(($("#eva_div_all").children().eq(j).children().children().eq(0).attr('checked'))=='checked '){
var valid_checked = $("#eva_div_all").children().eq(j).children().children().eq(0).attr('id');
if (valid_checked==checked_name){alert(alert_des);return;}
                                                                                                                                                                                 ');
var temp_html = $("#" temp).html();
var before_temp = $("#eva_div_all").children().eq(j num).attr('id' );
var before_temp_html = $("#" before_temp).html();
$("#" temp).html(''); '');
$("#" temp).html(before_temp_html);
$("#" before_temp).html(temp_html);            new_order( ); ! ');
}


It was as if a flying insect had entered my eye. I kept rubbing it and rubbing it, but it couldn't come out. This was how I spent the day.
I had no choice but to untie the bell, so I needed someone to tie the bell. She came and debugged it for a long time, but it still didn’t work. Later, when I compared her local code, there was no difference, and her local code was running normally. Later we reached a consensus on the browser issue.




Copy code


The code is as follows:
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn