Responsive design and advertising [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
This is my first attempt at creating a responsive website.
So, I have stylesheets loading depending on the size of device, meaning that some divs may or may not be visible.
One problem that I've encountered is that on mobiles I don't want to show a panel that has content and advertising. The issue I have is that I am still building that panel and making the mobile visitors download it but not displaying it. It's still being loaded and I'm being credited for it, but can't be clicked/seen and I'll have my hand slapped.
So, how do I only load ads (let's say an iframe or javascript) if the div is to be visible? Or even better maybe only load a complete div/panel if it's visible?
Or am I going about this the wrong way?

Related

Contact box is inoperable while in "mobile" size resolution. HTML/CSS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
There is no custom css set for smaller resolutions. I am having a problem where if I load the webpage at a low enough resolution, click the contact box, I cannot enter any fields till I stretch the browser to a larger resolution. At this point I can edit the contact box and also go back to the mobile resolution and have it still be operable.
The only way to truly explain this would be for you guys to go to the temporary site I setup here. I have scanned the HTML code to see if I am missing a closed div or something, but this scenario is very odd to me, especially since it works at a full resolution.
Please let me know what I am missing, I have exercised all of the possibilities.
It seems to be a problem with the z-index of either the pop-up or the background/overlay that comes up with it. I pulled up the dev tools and set a high z-index on the pop-up and a low index on the overlay and that fixed it. However, the elements are reset each time you open the pop-up. That makes me think that the elements are generated each time rather than shown/hidden. Whatever the situation is, you'll need to add an appropriate z-index to either the css or the element's themselves (inline - not recommended) and possibly with an !important depending on what all is going on in the code.

Javascript object text/html automatically redirects [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
In my webpage i have created a little div that contains an external site. My code looks like this:
var divPrev = createElement('div', 'divPrev', 'divPrevcss');
var objSf = createElement('object', 'objSf', 'objSfcss');
objSf.setAttribute('type','text/html');
objSf.setAttribute('data','http://'+oStxt.value);
divPrev.appendChild(objSf);
divMain.appendChild(divPrev);
I use this like a preview and it works with most of the websites, but with some, when the site loads into my div, after a few seconds it loads the site instead of my page, as if redirecting the browser.
An example is if I show into my div http://www.salomon.com.
How is possible prevent this type of behavior?
You can use an <IFRAME> to embed an other HTML document into your webpage. It has full cross-browser support.

Overwrite Instagram Follow button text [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am using this tool http://instafollowbutton.com/ in order to create a follow button for Instagram in my site.
I am wondering if it is possible to overwrite the js file so as to change the word "Following" when you follow someone with just "Follow" instead. And if yes how can I do that?
Thanks in advance
If it's on your site, then you can use Javascript (jquery would make this easier) to find the element on the page, and change the text.

Scroll faster using css or javascript - parallax [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am trying to figure out how this website does this effect :
http://rosedalelivery.com/
Can this be done using css? I tried using multiple background images, but the scrolling effect just doesn't match up.
Thanks in advance.
The best way to checkout how a website achieves something in CSS or JS is to use Chrome's Inspector tool.
You can right-click on the site's page and inspect the site's resources (cmd + option + i on Mac) -- click the resource tab. Under the scripts it shows a stellar.js which is a popular jQuery plug-in for doing parallax scrolling that's done on the website you're referencing.
The Stellar.js website: http://markdalgleish.com/projects/stellar.js/
Stellar.js Github page: https://github.com/markdalgleish/stellar.js
It also looks like the site is using NiceScroll for mobile scrolling: http://areaaperta.com/nicescroll/

Promove animation on HOVER - Jquery [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I'd like to know some ways to animate icon on HOVER.. I'd like them to work like animated gifs...
Here is an example:
TRASK INDUSTRIES LEFT MENU
When you hover icons on the left menu they get an animation!
I google unsuccessfully for a solution...
Thanks.
The site you referenced is using sprite sheets for animation. Essentially a sprite sheet is just an image that contains frames for an entire animation. When displayed, you crop the image to match the dimensions of a single frame and adjust the position of the image to move to different frames.
Here are some jQuery plugins to help you get started.
Spritely
SpriteSpin

Categories

Resources