Solved

ddselect problems

Posted on 2014-03-26
5
304 Views
Last Modified: 2014-03-28
I copied the ddselect code from github.
http://www.kids4kars.org/madlib2.asp

Is there a way to change the js code that when you select an option from the second box, when it copies the information to a div, it removed the image part and just shows the label?
0
Comment
Question by:rivkamak
  • 3
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
please take time to provide the right information :
The plugin on github (ddslick not ddselect) : https://github.com/prashantchaudhary/ddslick

when it copies the information to a div

Which information? first and second box?
Is second box is depending the first one but not currently?

On the first documentation (http://designwithpc.com/Plugins/ddSlick) example I see :
onSelected: function (data) {
        console.log(data);
    }

Open in new window


If you add the following code to the SECOND ddslick parameter, it should work :
onSelected: function (data) {
        $('#demoBasic img').hide(); // hide image of the first one
    }

Open in new window

0
 

Author Comment

by:rivkamak
Comment Utility
when I load the page, the boxes first load as regular text and then the page jumps and the code kicks in.
is there a way to make the code load faster, so people don't see the time delaY?
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
You should confirm your FIRST question has been answered... or not... before asking something else...
0
 

Author Comment

by:rivkamak
Comment Utility
yes, the first question was answered and you will get your points.
now can you help me with the second?
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
So why not closing the quesion and see if I want to answer the second one?

Anyway :
Add this CSS to hide the dropdown :
#demoBasic, #divNoImage {
   display:none;
}

Open in new window


This is how to show the first one AFTER creating it :
$("#demoBasic").show();

Open in new window


This is how to show the second one AFTER creating it :
$("#divNoImage").show();

Open in new window

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now