JQuery :: Hide Advertisement "image" For X Period Of Time After Being Clicked On It?
Oct 1, 2011
I'm displaying ads on my website, but I would like to hide the script for, let's say 12 hours, after it has been clicked on it. I somehow managed to create something, but it's still not what I want. On refresh, the image is back. I know that i have to use jquery cookies, but i'm really new to jquery so I've got no clue how to set up the cookies into that script.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script>
<div class="news">[ code]....
View 2 Replies
ADVERTISEMENT
Jun 28, 2010
I want to rotate content every x seconds but my app often sits in another tab out of view for a period of time.Basically after a period of time, if the div is viewable by the user, I would like to refresh it. How can I do this?The time part is easily. How do I also detect the div is in view?
View 1 Replies
View Related
Jun 17, 2008
I want to run a quiz competion on my website in which after logging any user play that quiz, like I will give 50 question to solve in just 3 min time, all will be objective question, now after that 3 min, quiz will automatically end and all users marked answer entered to the database, means he has not press any submit button, but after specific time all answer automatically enter in the database, and he come out from it..
Now I am using this timer:
<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" "[URL]">
<html><head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body>
<?php
$dateFormat = "d F Y -- g:i a";
$targetDate = time() + (1*60);Change the 25 to however many minutes you want to countdown
$actualDate = time(); .....
Where to bring changes or which new thing is to be added.
View 7 Replies
View Related
Sep 14, 2010
I am trying to move an image down 20px each time the button is clicked, but I can only get it to move down once. I see what I am doing wrong, but I'm not sure how to fix it. I don't know how to store the updated position of the image in a variable.
View 5 Replies
View Related
Apr 9, 2010
Im using a jQuery script to show/hide a div based based on the selection made via a dropdown.
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
The problem im having is that the value used in the dropdown lists are price values eg 10.00
Consequently jQuery seems to interprit these as css notations, meaning the code doesnt work.
View 4 Replies
View Related
May 11, 2011
Is their anyway to have a tight loop of code long for a long period of time without freezing the page? I want to be able to do:
for (i=0;i<9999999999;i++){
//some code
if (i%100==0){
yield();
}
}
View 8 Replies
View Related
Dec 26, 2011
[URL]..Default.aspx I have both a carousel with images andalso animagemap(notnot published yet)with coords that when clicked i want to write to a cookie file which image or image map coordinate was clicked, so when they are hyperlinked to the next page the correct div opens based on first reading the cookie written to on the previous page. Anybody have a basic script for reading and writing to a cookie using jquery in this fashion?
View 2 Replies
View Related
Feb 15, 2012
In my web site I have a jquery tab. When clicked a tab I want to show a div which writes loading [ <div class="loading"><p>Loading...</p></div> ] and hide it when the clicked tab content is shown. Is there a way to do this?
My code is below.
<script>
$(function() {
var $tabs = $('#tabs').tabs();
[code]....
View 1 Replies
View Related
Apr 8, 2010
I want to add 5 to the variable 'paramdatastart' each time the #btn is clicked. So when I click it first time the 'paramdatastart' will be 5 and next time it will be 10 andso onHow do I do that?
This is the code:
View 3 Replies
View Related
Nov 3, 2009
I have a very simple web page that is comprised of the same image over and over again. I have it to when you click on it, it swaps the image out and adds 1 to the counter. I need it to subtract 1 when you click it again.
<script type="text/javascript">
var namesVec = new Array("block.png", "block_hover.png");
var root='images/';
function swapImg(ima){
// divides the path
nr = ima.getAttribute('src').split('/');
// gets the last part of path, ie name
[Code]...
I mean, is there a way to assign "add 1 when clicked" or "subtract 1 when clicked" to image properties?
View 4 Replies
View Related
May 28, 2009
I am currently getting a music blog started and have been given the opportunity to place an ad on my site. They company has given me the code for the Javascript ad, but when I put it in (at the top of my page) on my HTML/CSS sheet, it automatically aligns to the right. I really want it to align in the center. How do I get it to do this? I have tried typical align="center" methods but it looks like the Javascript requires a different type of coding and I am not familiar with it.
View 1 Replies
View Related
Dec 16, 2011
I have working code to Show/Hide content when clicked on link of particular section:
var showText="Show content FAQ1";
var hideText="Hide content FAQ1";
1. How to do link on particular Title and show this description like Description1, Description2 etc.
2. How to open some sections in advance inside Javascript?
Working code is the following using Jquery jqueryV1.4.4:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">[code]....
View 1 Replies
View Related
Jan 16, 2009
I have a page with 10 buttons, when the user presses a button it shows/hides the respective <div> containing the information. However if they show a div and try to show another before hiding the last one both of them are visible.Is there a way to iterate through all the div names and hide all off them and then show only the one that was selected?
View 10 Replies
View Related
Mar 23, 2011
How would I go about making a timer?
Basically, I wan't to keep track of the time since a button was clicked. (onclick="starttimer()")
Also, how would I go about picking a random number between say 100 and 500?
View 6 Replies
View Related
Jul 13, 2007
Is there a way/script which I could possibly use to disable an external advertisement from my web host?
Below is the code for the advert:
<script language='javascript' src='https://xxx/hosting_ads/jp01.js'></script>
I would like to force the advert out or block it from appearing altogether. Is that possible at all? Hope anyone could help me out here.
View 3 Replies
View Related
Oct 7, 2010
I awhen it comes to "developing" jQuery but I am trying to do something that is seemingly something simple but I can't for the life of me, figure out the best way to do it.
http:[url].....
Here, you'll see the area below the navigation that has five buttons which are supposed to help scroll between the five associated divs.All I want to do is hide the currently shown div and then slide in the div associated with the button clicked.http:[url].....Here is what the animation is SUPPOSED to look like but the problem is is that the correct one uses Prototype and I am trying to use only one library and jQuery is the most suitable because I use it for other effects in the site and jQuery and Prototype obviously don't mesh well.
View 3 Replies
View Related
Mar 10, 2010
I'm using jQuery to add some extra functionality to our Request Tracker installation, and I've run into a small problem. It uses generated ids for various elements, including one I want to use in a selector. The id is 'TitleBox--_Ticket_Display.html--ticket-info-requestor-------0', which as far as I can tell is valid, but has a period in the middle of it. If I use either of:
Then I don't get a hit. I also tried using \2E for the period, with no luck. Is there another method to select these nodes?
View 5 Replies
View Related
Nov 28, 2011
I am having some real trouble figuring out how I can hide and show divs one at a time, a bit like an accordian. Currently, I have several buttons, which open and close a div containing a ul menu. What I am trying to achieve is to only have one div showing at a time.
So for instance, when the page loads no divs are displayed, just the buttons. You click a button a div slides out. you click another button this div closes and another opens. I am new to jQuery, but working hard to understand and learn. So far I have the below for each button (div).
[Code]...
View 2 Replies
View Related
Sep 2, 2011
I need to add a Javascript advertisement as a background (skin) to a Wordpress site. The background image is included in the CSS so how do I change this for a Javascript code
View 1 Replies
View Related
May 18, 2009
I have a table of data, and I would like these options to show up when that <td> is hovered over, but as you can see this hides/shows every <td>.
$('div.msgEdit').hover(function() {
$('td .msgEdit a').show();
},
[code]....
View 2 Replies
View Related
Dec 15, 2011
I have a UL group with multiple LI items, and each LI has a DL with a DT and DD inside. What I am trying to do is show EACH LI's DT, but not the DD. The DD will only show once the DT has been clicked (except for the first, which should be visible on page load.here is the structure code ... I am struggling to make this work using jQuery show/hide functionailty.
<!-- LIST -->
<ul class="examples">
<!-- ITEM #1 -->
[code]....
View 1 Replies
View Related
Jun 10, 2010
one could add a 'start' & 'stop' (id="stopit") button to control the simple sprite animation. My Javascript looks like this (note that it works in tandem with the core.js that comes with the book; see the ZIP file i've attached):
Code:
var Robot =
{
init: function() // initiate via core.js
{
[Code]....
clicking on the 'start' button more than once speeds up the animation, more with each successive click. Clicking the 'stop' button will only finally stop the animation if it's done the same number of times as the 'start' button was clicked.
View 5 Replies
View Related
Feb 24, 2009
Is there a way in which I can make a div go to display:none when you click outside it? Here's what I've already got:
<script language="javascript" type="text/javascript">
function displayDiv()
{
var dv = document.getElementById("test");
[code]....
View 3 Replies
View Related
Jul 18, 2011
I am building a web application using PHP. It lists each salesperson and below it, the clients assigned to them. There are only about 5 or 6 salespeople. There could be any number of clients for a salesperson. Each salesperson is given their own div and client information (name, email, phone) is grouped with an unordered list:
Code:
<div id="salesperson-1">
<h1>Salesperson 1</h1>
<ul>
<li>Steve Smith</li>
<li>steve@company-a.com</li>
<li>555-5555</li>
<li><a href="#">Delete Client</a></li>
</ul>
<a href="#">Delete Salesperson</a>
</div>
I would like to be able to delete (actually hide) either a salesperson or client depending on which link the user clicked. I have been using JQuery throughout my site so far and I can accomplish the task for the salespeople by creating individual events for 6 salespeople. If there are only 5 people, the 6th event will never be triggered. If there are 6, everyone is covered. The tricky part are the clients since I can't guarantee a specific number of them. I would like to fit best practices as much as possible and reduce the complexity of my code if I can. Keeping that in mind...Is there a better way to handle the salespeople rather than rewriting the function 6 times? Can I pass a variable to a JQuery function using the onClick binder on the <a> tag --> <a href="#" onClick=deleteClient(10)> and use the variable to determine which client to delete? Would using a function in plain javascript and ignoring JQuery for this entirely be better?
View 2 Replies
View Related
Oct 23, 2011
I'm trying to create a list of questions and answers, with the questions hidden on page load. They get hidden by this Javascript (to avoid breaking the site for those without JS):
Code:
function init() {
var dds = document.getElementById("qanda").getElementsByTagName("dd");
for (var ddid=0; ddid<dds.length; ddid++){
[Code]....
how I can go about displaying the <dd> tags again? I've tried Google, but not being familiar with Javascript terminology, haven't got very far!
View 4 Replies
View Related
Oct 12, 2010
I would like to have a multiple onclick show/hide menu system with javascript. And theres one more thing I need is to hide my menu when someone clicks outside it.
So basically I have a hidden div layer and a link. And when someone clicks on it I want the hidden div layer to show. And on a second click I want it to be hidden again. But if the menu is displayed and someone clicks outside it then hide it again.
If that makes sens now I really would like to have a anwser on this I have searched on the internet like 20 times already and all those code sucks.
I do not want any body onclick examples and I don't want to use JQuery.
This is the code I have so far I hope someone could give me example with my code intergrated into it
HTML Code:
<a href="javascript:void(0);" onclick="NCG_toggle('option');">Panel</a>
<div id="option" style="display:none;">
<a href="">my test</a>
[Code]....
View 4 Replies
View Related