[Solved] how do I dynamically toggle a button image using different font-awesome images? [closed]

You can use simple boolean value in the component and *ngIf statement in HTML to show/hide necessary icon (or any other element), which will be based on that boolean value. You also need to add (click)=”isPlaying = !isPlaying” to that icons to trigger the state: HTML: <i class=”fa fa-play-circle” aria-hidden=”true” *ngIf=”!isPlaying” (click)=”isPlaying = !isPlaying”></i> <i … Read more

[Solved] Need a button that copies info from one div to another [closed]

I think this code will help you using just Javascript 😉 function copy() { var fname = document.getElementById(‘FName’).value; var lname = document.getElementById(‘LName’).value; document.getElementById(‘results’).innerHTML = fname +”, “+lname; return false; } The “results” is the id of the DIV where your result would be show 😉 solved Need a button that copies info from one div … Read more

[Solved] CSS Random space between elements

Your <video> is a inline element which has a vertical-align by default (baseline). You can either vertical-align it with middle or easier make all <video>s block elements: video { display: block; } http://jsfiddle.net/Atup4/ 0 solved CSS Random space between elements

[Solved] how do I let users of my website submit data to my website for all my users to see with just javascript [closed]

You cannot do this with just javascript. Here’s why. Javascript runs on the client browser. Every visitor to your website will run javascript code on their own computer, with no communication with the server (except through AJAX, which sends data from javascript back to a server-side file and then (optionally) returns new data from the … Read more

[Solved] How to calculate width and height of element in JQuery [closed]

you should use this code since you are using jQuery so that it can do its magic for browser compatibility: $(‘#submit’).click(function(){ var width = $(ddbar).width(); var height = $(ddbar).height(); alert(width); alert(height); }); Of course, jQuery approach will be slower: http://jsperf.com/jq-width-vs-client-width solved How to calculate width and height of element in JQuery [closed]

[Solved] select a web form and load it [closed]

It is a rather broad question, but I’ll try to answer it. The following approach enables you to put all the forms in one .html file and just give them different ID. (Say #form1, #form2, #formN.) If a user selects one, you should just figure out the right ID and then do: $(‘#elementYouWantTheLoadedFormIn’).load(‘ajax/fileWithTheForms.html #’ + … Read more

[Solved] how to open an html page using html5 [closed]

On a button click? I would suggest HTML: <input type = “button” onclick = “openpage()” value = “open page”> JavaScript: function openpage() { window.location.assign(“http://www.yoursite.com/main.html”); } But why not just use a link? <a href = “https://stackoverflow.com/questions/16855551/main.html”>Main page</a> Your question was hard to understand. I think this is what you want. 3 solved how to open … Read more

[Solved] Hide div on mouseout [closed]

I have fiddled the code try it. using jquery var diva = $(‘div.a’), divb = $(‘div.b’) divb.hide(); diva.on(‘mouseover’, function(){ divb.show(); }); diva.on(‘mouseout’, function(){ divb.hide(); }); http://jsfiddle.net/6fff9/1/ 3 solved Hide div on mouseout [closed]

[Solved] Implementation of Nearby Person on web page [closed]

An implementation could be something like this: <?php $people = [ ‘John’, ‘Adam’, ‘Terry’, ‘Gary’, ‘Wilbur’ ]; $get_closest = function ($person) use ($people) { $closest = []; $key = array_search($person, $people); if($key !== false) { $before = $key-1; $after = $key+1; if(isset($people[$before])) $closest[] = $people[$before]; if(isset($people[$after])) $closest[] = $people[$after]; } return $closest; }; var_dump($get_closest(‘Gary’)); Output: … Read more

[Solved] conflict between Jquerys

I find the solution .The solution is to use noConflict function like that : <script> var jq172 = jQuery.noConflict(); jq172(document).ready(function() { var jQueryTabs1Opts = { event: ‘click’, collapsible: false }; jq172(“#jQueryTabs1”).tabs(jQueryTabs1Opts); }); </script> 2 solved conflict between Jquerys

[Solved] I want to add text field in html dynamically using jquery or javascript to a particular button [closed]

i am showing you in javascript. First make your html file look like this <div class=”rButtons”> <input type=”radio” name=”numbers” value=”10″ onclick=”uncheck();” />10 <input type=”radio” name=”numbers” value=”20″ onclick=”uncheck();” />20 <input type=”radio” name=”numbers” value=”other” onclick=”check(this);”/>other <input type=”text” id=”other_field” name=”other_field” onblur=”checktext(this);”/> </div> In the second step write this css code to initially set the text field invisible. <style … Read more