Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select id="surah_selection" style="position:relative; top:10px; left:25px">
- <option id="1">Select Surah</option>
- <option id="2" >Al-Baqra</option>
- <option id="3">Al-Fatiha</option>
- <option id="4">Al-noor</option>
- <option id="5">Al-Tobah</option>
- </select> <!--Surah selection ends -->
- $('#book_selection').change(function(){
- alert("changed");
- var option = document.createElement("option");
- option.text = 'df';
- option.value = 'df';
- var temp = document.createElement('select');
- temp.appendChild(option);
- var root = document.getElementById('book_selection');
- root.appendChild(temp);
- alert("done");
- });
- $('#book_selection').change(function(){
- var newSelect=document.createElement('select');
- var selectHTML="";
- for(i=0; i<choices.length; i=i+1){
- selectHTML+= "<option value='"+choices[i]+"'>"+choices[i]+"</option>";
- }
- newSelect.innerHTML= selectHTML;
- document.getElementById('book_selection').appendChild(newSelect);
- });
- $('#book_selection').change(function() {
- $("<select />").append($("<option>", {"value": "me", "text": "me"})).insertAfter($(this));
- });
- <select id="surah_selection" style="position:relative; top:10px; left:25px">
- <option id="1">Select Surah</option>
- <option id="2" >Al-Baqra</option>
- <option id="3">Al-Fatiha</option>
- <option id="4">Al-noor</option>
- </select>
- <script>
- function add(){
- var str="<option id='5'>Al-Tobah</option>"
- $("#surah_selection").append(str);
- }
- </script>
- <div class="surah_selection></div>
- var selectSurah = '<select id="surah_selection" style="position:relative; top:10px; left:25px"><option id="1">Select Surah</option><option id="2" >Al-Baqra</option><option id="3">Al-Fatiha</option><option id="4">Al-noor</option><option id="5">Al-Tobah</option></select>';
- $(".surah_selection").prepend(selectSurah);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement