[Solved] Show or hide a field using jQuery or Ajax [closed]

HTML <label for=”chkEle”>Check This</label> <input type=”checkbox” name=”chkEle” /> <div id=”divEle” style=”display:none;”><date stuff></div> JS $(“input[name=chkEle]”).change(function(e) { $(“#divEle”).toggle(); }); .change is triggered even if the label is clicked instead of the checkbox. This also allows you to dynamically make change in js later. For instance if you wanted to force the checkbox selection on page load, then … Read more

[Solved] Is it possible to use content of another website using jQuery? [closed]

Look up iframes for a native HTML solution – https://developer.mozilla.org/en-US/docs/HTML/Element/iframe Alternatively, research using the jQuery .load() function – http://api.jquery.com/load/. However, the functionality of this is limited by the same origin policy solved Is it possible to use content of another website using jQuery? [closed]

[Solved] remove white space before comma

You need to use: $(‘[data-title=”Score”]’).text().replace(/ \,/g, ‘,’); //or .replace(” ,”, ‘,’); for single occurence if you want to replace the text : $(‘[data-title=”Score”]’).text(function( index,text ) { return text.replace(/ \,/g, ‘,’); //or .replace(” ,”, ‘,’); for single occurence }); Working Demo 3 solved remove white space before comma

[Solved] jQuery – do something once AJAX complete [duplicate]

You can do this: $.post(url, data, function () { alert(“success”); // Call the custom function here myFunction(); }); Or this: // Assign handlers immediately after making the request, // and remember the jqxhr object for this request var jqxhr = $.post(url, data); jqxhr.done(function () { alert(“second success”); // Call the custom function here myFunction(); }); … Read more

[Solved] i am working on flip image but it’s not working [closed]

I think this is your perfect answer. .flip { height: 199px; width: 300px; margin: 0 auto; } .flip img { width: 300px; height: auto; } .flip .back { background: #2184cd; color: #fff; text-align: center; } <head> <script src=”https://code.jquery.com/jquery-2.1.4.min.js”></script> <script src=”https://cdnjs.cloudflare.com/ajax/libs/jQuery-Flip/1.1.2/jquery.flip.min.js”></script> <script> $(function () { $(“.flip”).flip({ trigger: ‘hover’ }); }); </script> <script> $(function () { $(“.flip”).flip({ … Read more

[Solved] Calling javascript function in my PHP code

You need quotes around the texts and properly set window.onload: <?php function GET($key) { return isset($_GET[$key]) ? $_GET[$key] : null; } $alert = GET(‘message’); echo “<script>window.onload = function () { “; if ($alert == “success”) echo “success();”; else if ($alert == “removed”) echo “remove();”; echo ” };</script>”; ?> If those two are all you need, … Read more

[Solved] i need an answer please : bootstrap 3 this is for a job applyment?

i found the result my self just for fun ,here the solution: body img { float: left; } body img:nth-child(2n) { float: right; } #content{display:flex;text-align:center;width:100%} .changeme1{ margin-left:auto;float:none; } .changeme2{ margin-right:auto;float:none; } solved i need an answer please : bootstrap 3 this is for a job applyment?

[Solved] set up error message for drop down

Yes. You can acheive that with the combination of PHP and JQUERY Let’s say this is your first page <form action=”secondPage.php” method=”post”> <select id=”men” class=”select_class1″ name=”subselector”> <option value=””>Choose an Item</option> <option value=”tsm”>T-Shirt</option> <option value=”lsm”>Long Sleeve</option> <option value=”tankm”>Tank Top</option> </select> <input type=”submit” value=”submit” /> </form> Then this would be your secondPage.php <?php $subselector = $_POST[‘subselector’]; ?> … Read more

[Solved] JQuery and WinJS – Promise [closed]

Promises are a programming pattern for dealing with asynchronous operations. The pattern could be applied to other languages, but they are most commonly encountered in JS libraries (like jQuery and WinJS). Kraig Brockschmidt has a really good blog post about how they work (in general) and in WinJS here: http://blogs.msdn.com/b/windowsappdev/archive/2013/06/11/all-about-promises-for-windows-store-apps-written-in-javascript.aspx I’ve written a blog post … Read more

[Solved] Want to find the url from html tag [closed]

Try the below $(function() { var a_href = $(‘#website-view a’).attr(‘href’); var decodedUri = decodeURIComponent(a_href); var url = decodedUri.split(“url=”)[1].split(“&”)[0]; alert(url); }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div id=”website-view”> <ul> <li> <a target=”_blank” href=”https://stackoverflow.com/redir/redirect?url=http%3A%2F%2Ffacebook%2Ecom%2Fshwet&amp;urlhash=GvM1″>My Facebook</a> </li> </ul> </div> 2 solved Want to find the url from html tag [closed]

[Solved] Change the src of an image with an Href [closed]

Sorry if it took long! Here’s a working JsFiddle! $(document).ready(function () { var items = $(“nav.bgNav ul”); var img = $(“#bgStretchimg”); next(); function next() { var urlI = items.children(‘.active’).children(“a”).attr(‘href’); var nextI = items.children(‘li.active’).removeClass(“active”).next(); if (nextI.length == 0) { nextI = items.children().eq(0); } nextI.addClass(‘active’); img.attr(‘src’, urlI); // schedule next iteration setTimeout(function () { next(); }, 2000); … Read more