Jump to content

mwbarry

Members
  • Content Count

    70
  • Joined

  • Last visited

Community Reputation

3 Neutral

About mwbarry

  • Rank
    Newbie
  1. I am trying to write a script that will put padding on the bottom of an element relative to the size of the screen minus the content and footer. This script works only when padhgt == tothgt, but not with the other 2 vars. Even when I set specific CSS height values for 'ja-content' & 'ja-footer', it still does not have a height value. Any ideas? <script type="text/javascript">function foothgt() { var tothgt = screen.height; var conthgt = document.getElementById('ja-content').style.offsetHeight; var fothgt = document.getElementById('ja-footer').style.offsetHeight; var padhgt =
  2. I am trying to write a script similar to this one: http://w3schools.invisionzone.com/index.php?showtopic=42074that will make the minimum height of a content box 16px less than that of a sidebar. When I run this script I get an error message in the console that says "Uncaught TypeError: Cannot read property 'style' of null" Here is the script: <script type="text/javascript">function contentheight() { var sideheight = document.getElementById('ja-col1'); var sideitem = sideheight.offsetHeight; document.getElementById('ja-content-inner').style.minHeight = sideitem - 16 + "px";}</scr
  3. Perfect! I didn't know the name history could do that.
  4. Yea I always do initial testing during development in Chrome and then work out any kinks in other browsers. The function works for the other sites in chrome but this site isn't working.
  5. Sorry if that was unclear. When the user clicks a link on the nav bar an AJAX request is called to get an xml document to replace the content on the page. Instead of having a hashtag (ex <a href="#contact">) I used the above function to change the URL (ex. from home.html to about.html) even though it is still technically the same page.I've used this function before and it has worked perfectly, but for some reason it isn't working on a site I'm doing now. When I look for errors in the console it says : Uncaught TypeError: Object function history(element) {var stateObj = {home: elemen
  6. I just copied a script for changing the URL from one site to another but on the new site the function doesn't work and I am receiving an error in the console - "has no method pushState" Here is the code function history(element) {var stateObj = {home: element.id};history.pushState(stateObj, "page2", element.id + ".html");} It is called via 'onclick' along with an AJAX request to change the content. Any idea why this works on one site and not another?
  7. That doesn't work as setting #sideleft to 100% height in the css it has no height. I think it has to return a pixel value. For testing purposes I set #mainbody to height: 900px; and the function still did not work.
  8. My website has a content area that changes height depending on what page of the site you are on. There is a sidebar that I want to match the height of the content, no matter how high it is.I am trying to write a javascript function to accomplish this. function shadowlength() {var thecontent = document.getElementById('mainbody');var theheight = thecontent.style.height;document.getElementById('sideleft').style.height = theheight;document.getElementById('sideright').style.height = theheight;} #mainbody is the content area that changes height, #sideleft & #sideright are the two sidebars th
  9. On my site I have written a script so that when the user clicks a link on the nav bar, the url change is delayed to make time for a fade away animation. It works perfectly in Safari, but when done with firebug opened in Firefox I get an error for the setTimeout function saying that, for example, 'services is not defined'. What does this mean and does anyone have any ideas on how to fix it? Here is the code: menu html code <li id="liservices"><a href="#" onclick="menuredirectdelay(this)" class="nav" id="services">services</a></li> delay javascript function menured
  10. OK I figured it out if anyone else is interested. Instead of having 'apple-touch-icon.png' in your servers root folder and having apple automatically detect it, you must link to it externally. I did it by putting the image in the images folder with all the other images on the site. Then add these lines of code in the head of your site. <link rel="apple-touch-icon-precomposed" href="images/apple-touch-icon.png" /><link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/apple-touch-icon.png" /><link rel="apple-touch-icon-precomposed" sizes="112x112" href="images/
  11. Not sure if this is the correct forum for this post... I have an apple-touch-icon for my site that has the glass effect automatically added to it. I know with apps it is possible to disable this auto effect but I have not been able to figure out if it's possible to do so with website bookmark icons. Is it possible and how do I do it?
  12. Tried it before I posted. Didn't work.I've tried a couple other things to no avail. Anyone know if it's even possible?
  13. Is it possible to combine transitions and rotations?Would it be some thing like this? #para{ -moz-transition: -moz-transform 0.6s linear; -webkit-transition: -webkit-transform 0.6s linear;}#para: hover { -moz-transform: rotate(90deg); -webkit-transform: rotate(90deg);}
  14. I am trying to develop my page so that when the page loads the content fades in sequentially using jquery. The first item works perfectly, but I can't get the others to work properly. Here is what I have: <script type="text/javascript">$(document).ready(function() { $("#pagehdr") .animate({left:"0px"},{queue:false, duration: 700}) .animate({opacity:"1.0"},700); $("#pagesubhdr") .delay(500) .animate({left:"0px"},{queue:false, duration: 700}) .animate({opacity:"1.0"},700);})</script> #pagehdr animates properly, but #pagesubhdr does not delay and performs animations
×
×
  • Create New...