[Solved] beginner trying to apply a tax rate to an individual’s income

I wonder how much of that was a template. Oh by the way, have faith in yourself. I don’t know how much of that you wrote yourself, but for the function itself, only the IncomeInput<=20000 comparator needed to be switched. <html> <head> </head> <body> <script> function calcTax() { var IncomeInput, TaxRateCalc; IncomeInput = parseInt(document.TaxInfo.Income.value); if … Read more

[Solved] Make a webpage display more items on mouse hover at the bootom?

well somethng like this really helped. function yHandler () { var wrap = document. getElementById(‘wrap’); var contentHeight = wrap.offsetHeight; var yOffset = window.pageYOffset; var y = yOffset + window.innerHeight; if (y >= contentHeight) { wrap.innerHTML += ‘<div class=”newData”></div>’; } } window.onscroll = yHandler; solved Make a webpage display more items on mouse hover at the … Read more

[Solved] javascript change div text on ready [closed]

You wrote about IDs, but in your code is class. <div id=div1>YES</div> <div id=div2></div> <script> var div1 = document.getElementById(‘div1’); var div2 = document.getElementById(‘div2’); if (div1.innerHTML == ‘YES’) { div2.innerHTML = ‘You said YES’; } </script> http://jsfiddle.net/7r9cwf3s/ OR generally, if you want to put into the second one div ‘You said ‘ and content of the … Read more

[Solved] How do I add class using jquery/javascript to different elements depending on what day is it?

You don’t need jQuery to check what date it is. You can use plain Javascript for that. var today = new Date(); if(today.getDate() === 17) { $(‘.on-17’).addClass(‘active’); } A more dynamic implementation that always adds class active to the current day’s div: var today = new Date(); var dayOfMonth = today.getDate(); $(‘on-‘ + dayOfMonth).addClass(‘active’); If … Read more

[Solved] Compass can’t link

Try like this. <link rel=”stylesheet” href=”https://stackoverflow.com/questions/25152936/stylesheet/style.css” type=”text/css” media=”all” /> solved Compass can’t link

[Solved] Referring to an id from url on a php page [closed]

This entirely depends on how you’ve set your page up, but just as with any HTML page you should be able to refer to: page.php#anchor Where anchor refers to an id within the page. Note the lack of / before the # solved Referring to an id from url on a php page [closed]

[Solved] how to add this jquery to mysite [closed]

this should work … $(document).ready(function() { $(“#web”).click(function () { $(“#contweb”).stop().slideToggle(); return false; }); $(“#web”).hover(function () { $(this).stop().css({ “cursor”: “pointer” }) }); $(“#screen”).click(function () { $(“#contscreen”).stop().slideToggle(); return false; }); $(“#screen”).hover(function () { $(this).stop().css({ “cursor”: “pointer” }) }); $(“#keyboard”).click(function () { $(“#contkey”).stop().slideToggle(); return false; }); $(“#keyboard”).hover(function () { $(this).stop().css({ “cursor”: “pointer” }) }); }); 3 solved how … Read more

[Solved] Hundreds of buttons in one page with same name and same ids, how to differentiate?

You can do it like Braziliam way, we call it as “Gambiarra” $(‘input [type=submit]’).click(function(){ var productname = $(this).parent().find(‘.post-meta-ab a’).html(); }); PS. If you cant set a UNIQUE ID for your DOM elements, don’t use any at all. Basically for each product on you list you have this structure: <li class=”ms-tt grid_3″ data-id=”id-1″ data-type=”digital”> <div class=”m-thumb … Read more

[Solved] When i click on an element add another ID or class

Try .on() As your content is added dynamically so it is not accessible directly ,So you have to use Event delegation. $(“.minwidth_IE”).on(“click”,”#custom_background span”,function () { $(“#account ,.minwidth_IE ,.main .main-head ,#fa_toolbar”).removeClass(“bg1 bg2 bg3 bg4 bg5 bg7 bg8 bg_custom”).addClass(this.id); my_setcookie(“custom_background”, this.id, true) }); 3 solved When i click on an element add another ID or class

[Solved] Getting the result of a checkbox in php [closed]

if(isset($_POST[‘new’])){ } Will tell you if it was checked. If you want to be able to check the value as well you need to give the input a value. <input type=”checkbox” name=”new” value=”someval” style=”float:right” /> <?php if(isset($_POST[‘new’]) && $_POST[‘new’] == ‘someval’){ } solved Getting the result of a checkbox in php [closed]

[Solved] How to make header become static in the top [closed]

If you want the menu should be fixed even when you scroll down then you have to use css property postion:fixed and the demo site which you have provided did the same thing <div id=”top” class=”wrapper”> <div class=”wrapper”> <div class=”logo left”> <img src=”https://stackoverflow.com/questions/17133819/images/dipstrategy.png” alt=”web agency”> </div> <div class=”navigation right”> <ul id=”nav”> <li class=”margin-right15 current”><a href=”#home”>HOME</a></li> … Read more