I hav a code make changes to dat code

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions
Some-useful-tutorials-for-students-to-learn-basic-of-coding-->View question


I hav a code make changes to dat code?

I have a drag and drop workable code.
 <script type=\"text/javascript\">
        $(function () {
            $(\"#dvSource img\").draggable({
                revert: \"invalid\",
                refreshPositions: true,
                drag: function (event, ui) {
                    ui.helper.addClass(\"draggable\");
                },
                stop: function (event, ui) {
                    ui.helper.removeClass(\"draggable\");
                    var image = this.src.split(\"/\")[this.src.split(\"/\").length - 1];
                    if ($.ui.ddmanager.drop(ui.helper.data(\"draggable\"), event)) {
                        alert(image + \" dropped.\");
                    }
                    else {
                        alert(image + \" not dropped.\");
                    }
                }
            });
            $(\"#dvDest\").droppable({
                drop: function (event, ui) {
                    if ($(\"#dvDest img\").length == 0) {
                        $(\"#dvDest\").html(\"\");
                    }
                    ui.draggable.addClass(\"dropped\");
                    $(\"#dvDest\").append(ui.draggable);
                }
            });
        });
    </script>
    <div id=\"dvSource\">
        <img alt=\"\" src=\"images/Chrysanthemum.jpg\" />
        <img alt=\"\" src=\"images/Desert.jpg\" />
        <img alt=\"\" src=\"images/Hydrangeas.jpg\" />
        <img alt=\"\" src=\"images/Jellyfish.jpg\" />
        <img alt=\"\" src=\"images/Koala.jpg\" />
        <img alt=\"\" src=\"images/Lighthouse.jpg\" />
        <img alt=\"\" src=\"images/Penguins.jpg\" />
        <img alt=\"\" src=\"images/Tulips.jpg\" />
    </div>
The above code is working  like if we drag and drop any one of the image it is showing that the details of the image.but actually what i wanted is if only two or more images drag and dropped den only it shows the details of the image.or else an error message.can make the above code like that?????    


By:alvin

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

Talk about thisDelete|Like|Dislike|


Answers

This question is asked without doing any research and it is not clear citation requered
metaphor

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------
@alvin there is no other way you have to read read read and refer this question here
arunwebber

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!