[Solved] Add Close-Icon to embeded Youtube-Video [closed]

You can simply do this with jquery , see an example below : $(function(){ $(“.closeBtn”).click(function(){ $($(this).data(“target”)).fadeOut(500); }); }); .closeBtn { position: absolute; cursor: pointer; top: 5px; left: 5px; z-index: 999999; } <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div id=”v1″> <div class=”closeBtn” data-target=”#v1″><img src=”http://downloadicons.net/sites/default/files/delete–delete-icon-32231.png” width=”30″ height=”30″ /></div> <iframe width=”932″ height=”510″ src=”https://www.youtube.com/embed/v5dU-dG9epY” frameborder=”0″ allowfullscreen></iframe> </div> solved Add Close-Icon to embeded Youtube-Video … Read more

[Solved] Does onclick work with any positioning? [closed]

Absolute positioning has no effect on how the onClick event is being fired. You are simply positioning your element below another element, so another element is blocking the mouse event Try adding to your CSS: #cogdiv { z-index: 9999; //or greater, or 1. Just make sure it’s bigger than the overlapping element’s z-index } Reading … Read more

[Solved] How do I delay an execution in Javascript?

You could use setTimeout(function(){dosomething}, timeout), btw. add console.log(‘something’) to see if the functions are actually executed. btw. if you’re using interval remember you might need to cancel it if you dont want it running forver, you could as well use recurring function (a function calling itself) with some condition on when to do processing or … Read more

[Solved] Setting min and max font size for a fixed-width text div that accepts variable text [closed]

Add an event listener to some changing property and then change the font size accordingly. document.getElementById(“testInput”).addEventListener(“keyup”, function(){ var inputText = document.getElementById(“testInput”).value; document.getElementById(“test”).innerHTML = inputText; if(inputText.length > 10){ document.getElementById(“test”).style.fontSize = “8px”; }else if(inputText.length > 5){ document.getElementById(“test”).style.fontSize = “10px”; }else{ document.getElementById(“test”).style.fontSize = “12px”; } }); <input id=”testInput”> <div id=”test”></div> 1 solved Setting min and max font size … Read more

[Solved] How to create form slider with 5 values [closed]

You can use jquery selecttoUIslider component. This component takes the select form elements and generates a jquery UI Slider element. Here is an example from page. Markup <select name=”optiontype” id=”idselect”> <option value=”Economy”>Economy</option> <option value=”Value”>Value</option> <option value=”Average” selected=”selected”>Average</option> <option value=”Splurge a little”>Splurge a little</option> <option value=”Luxury”>Luxury</option> </select> Javascript $(‘#idselect’).selectToUISlider(); You can check the demo page here … Read more

[Solved] Search form slow show [html] [closed]

To create such an effect you add a transition property for the width and the color of the input field. When the field has focus you simply change the width and color. .animated-input { background: #000; border: none; border-radius: 5px; width: 40px; transition: width 1s, background 1s; } .animated-input:focus { background: #fff; width: 200px; } … Read more

[Solved] Scripting a .write script containing HTML tags using only double quotes [duplicate]

Can’t you just escape the double quotes that you don’t want to terminate the string? \” evaluates to the literal character “. document.write(“<script src=\”” + (window.API_URL || “http://example.com/” + Math.random()) + “\”><\/script>’); 3 solved Scripting a .write script containing HTML tags using only double quotes [duplicate]

[Solved] remove text from multiple spans having same id [duplicate]

Dont give same ID to more than one one tag, use class instead <span class =”myId”>data1</span> <span class =”myId”>data2</span> <span class =”myId”>data3</span> <span class =”myId”>data4</span> <span class =”myId”>data5</span> call this function to clear function clearAll() { var ele= document.getElementsByClassName(“myId”); for(var i=0;i<ele.length;i++) { ele[i].innerHTML=”; } } 2 solved remove text from multiple spans having same id … Read more

[Solved] How to grey out part of a form? [closed]

Thanks for improving your question. One approach you could take is to add a class to each professor option which indicates which majorID it’s associated with like this: <div class=”form-div”> <h3><label for=”prof”> Then Select Professor: </label> <br></h3> <select class=”form-input” id=”prof” name=”prof”> <?php foreach ($professors as $prof) { ?> <option class=”major-<?php echo $prof[‘majorID’]; ?>” value=”<?php echo … Read more

[Solved] Regex scraper challenge [duplicate]

function extract_regex($subject, $regex, $index = 1) { preg_match_all($regex, $subject, $matches); if (count($matches[$index])) { if (count($matches[$index]) == 1) { return trim($matches[$index][0]); } return $matches[$index]; } return ”; } $out = extract_regex(“<label class=”area”><font class=”bg_info” onmouseover=”land_convert_txt(this,3067)” onmouseout=”tooltip_hide()”>3,067 Sq. Ft.</font></label>”,”/<label class=\’area\’>(.*)<\/label>/i”); echo “<xmp>”. $out . “</xmp>”; 11 solved Regex scraper challenge [duplicate]

[Solved] Problems reloading fields in a form [closed]

That happens because the script that sets up the datepicker <script src=”https://stackoverflow.com/questions/35529308/data:text/javascript,(function(%24)%7B%24(%22.datepicker%22).datepicker(%7BshowButtonPanel%3Atrue%2CdateFormat%3A%22dd%2Fmm%2Fyy%22%7D)%3B%7D)(jQuery)%3B” type=”text/javascript”>(function($){$(“.datepicker”).datepicker({showButtonPanel:true,dateFormat:”dd/mm/yy”});})(jQuery);</script> which in the home page is just after the form, is missing in the second page. solved Problems reloading fields in a form [closed]

[Solved] My JavaScript program is not working [closed]

Replace if (isNaN(startMiles) = false) by if (isNaN(startMiles)) Remove } after else <script type=”text/javascript”> function calcMPG(){ var startMiles = document.economy.startMilage.value; var endMiles = document.economy.endMilage.value; var gallons = document.economy.galonsUsed.value; if (isNaN(startMiles)) { window.alert(“You can only enter numbers”) } else { document.mpg = document.write((endMiles – startMiles) / gallons) } } </script> 1 solved My JavaScript program is … Read more