I need the cookie to expire automatically after 3 minutes but the following snippet of code from my jquery.cookie.js file is not working. The cookie reads "session" instead of an expiration date.
var date = new Date();
date.setTime(date.getTime() + (5 * 60 * 1000));
$.cookie("leftCol", "collapsed", { expires: date });
...
Hi... jQuery beginner here.
Here is what I'm working on. I have an area map with 10 hotspots on it. Hover over each of the hotspots and it shifts the background of the div (id=dialpad) to display other data (in a sprite).
The code I have currently works, but I have a separate function for each hotspot ID.
Ex:
$('#dial1')
//...
Hello
As I've said: Jquery doesn't work .this selection, what am I doing wrong? altho it works with other parametres. Here's code of mt mini gallery that's supposed to enlarge selected image and move down non-selected (works on single elements tho)
$(document).ready(function () {
$("#content img").click(function () {
$("#bl...
I have a image and in it wants to be fadein fadeout automatically when the document is loaded and it should be done till the document is closed ..
help me plzz
...
I have the following jquery code:
$(".rotateNews").load("/load_news.php");
var refreshId = setInterval(function() {
$(".rotateNews").load('/load_news.php?newsID=');
}, 5000);
This refreshes a div with the class rotateNews with load_news.php every 5 seconds. load_news.php pulls a random news article from a MySQL databas...
I've got a link I want to appear on my page,
<a>add another</a>
But it doesn't look like a link unless I add an href attribute. I'm going to be using jquery to add a .click() event to it, so it doesn't really need anything else.
What's the best value to href to? #? javascript:void(0)? My concern is if someone clicks it before the .c...
I have such a combo box in my site and I want it to load some content as soon as it's changed by the user. It's a simple one having each State of my country, check it out: http://jsfiddle.net/tzvyX/
It happens that in IE, the .change() method doesn't work and I don't know what to do to fix it. maybe some other event listener?
...
I have a script block, in the div element which is appended after html response. I want to access this block and call eval() function for this script. How can I access the script block.
I tried $("#divId script") , but it doesn't work.
<div id="divId">
<script type="text/javascript">
....
....
</script>
</div>
...
I have a link with a series of checkboxes, due to the legacy code, when the user clicks on a checkbox the value of it is appended as a comma deliminated list to the href.
The trouble is that now that I'm updating the code, I'm finding that the href is being followed quicker than the href is being adjusted, thus the list is being exclude...
Environment: ASP.NET 3.5, MVC 2 Web App, in the View file Index.aspx
I have the following jqGrid (excerpt of code):
$("#list").jqGrid({
url: '<%= Url.Action("GridData") %>',
datatype: 'json',
This is in an inline JS function called populateGrid. I need to move this function out of the View and into its own JS. In ...
i have a script where if you hover over a certin element, a unique DIV is displayed, and the others hide...very simple...
on page load, i call a div as the "intro" shown div....
what i want to accomplish, is if the other 5 elements are not being hovered over, it is displaying the intro div...
so, essentially in layman's terms:
show i...
I need my list item elements to bounce in place and not fall all over each other.
I created a JSFiddle of what I mean: http://jsfiddle.net/RGvjj/
Can someone advise me as to why the elements are doing that and what I need to do to fix that?
...
I'm using tabbed featured post for my blog. How to implement the div#latest-featured will hide() then show() it back after content fully loaded?
$(document).ready(function() {
//Default Action
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_conten...
I have a couple AJAX requests being used in a theme options page. Both worked just fine before, but now the first works and the second fails every time - the failure looks like this in Firebug: http://cl.ly/1w5u and this is in Webkit: cl.ly/1wYn. I'm not getting ANY response of any kind. The thing is, the first one works just fine.
Here...
How can I reset after append() or before()? Please help. Many thanks in advance.
if((#tag_id).text() == 'something'){
$(#tag_id).before("x");
}
// I want to reset the #tag_id to empty
$(#tag_id).val(''); // this doesn't work
...
I want to call a jquery function on load of the page. There is also another Javascript getting called onload of the body tag.
...
Hi,
I would like to add links on every date in my calendar. For example, if I click on the 25 august 2010, I would like that the page gets redirected to : xxxxxx/25082010/
(ddmmyyyy)
The plugins is this one : http://keith-wood.name/datepick.html
I can add an event when a date is selected (onSelect) but I can't get the date in the goo...
Hi, this problem is part of a bigger page but I've simplified the code to provide an easy example of what I'm talking about. Basically I have an ASP dropdownlist with AutoPostBack="true" and I want to do some javascript client side which can stop the postback if necessary. However, I can't get it to stop the postback.
<script type="te...
I have a list that is being returned from $.ajax function. I would like to add the returned list to a table. Below is a snippet of the code I am working with.
$(document).ready(function() {
$.ajax({
type: "POST",
url: "Home/LoadTable",
success: function(data) {
var loopList = data.message.NewList;
alert(lo...
I want to change the class of a td tag given the td tag's id:
<td id="td_id" class="change_me"> ...
I want to be able to do this while inside the click event of some other dom object. How do I grab the td's id and change its class?
...