Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ddselect problems

Posted on 2014-03-26
5
Medium Priority
?
315 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 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 39958518
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
ID: 39961861
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 83

Expert Comment

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

Author Comment

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

Expert Comment

by:leakim971
ID: 39961908
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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

877 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