affiliate_link
Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

Monday, May 28, 2012

How to set dropdown value using jquery?

If you know the value you can set it like this 
 
$("#myddl").val("somevalue");
 
Setting through index
 
$("#mydropdownlist").attr('selectedIndex', 0);
 

Tuesday, July 5, 2011

Displaying iFrame content in a DIV

if your images are outside of your iFrame, of course your dropdown menu will not show up since you are trying to tell the dropdown menu to go out of its windows. iframe is a different window inside your html, therefore any overflow of the window will never go out, elements inside the iframe is not affected with the z-index.

what you could do is, if your http://website.com/dropdown.html has the dropdown content only, you can call it by jQuery

<div id="myDropDown">
</div>


<script type="text/javascript">
    $(document).ready(function() {
        $("#myDropDown").load("http://website.com/dropdown.html");
    });  
</script>

this will append the content of your dropdown.html into the div