Solved

ddselect problems

Posted on 2014-03-26
5
310 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
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 82

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 82

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

860 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