Hey,
I am attempting to scroll the window to a location on my page based on a user's selection. I am getting some strange results. Can anyone suggest a good/better way to go about this?
Here is what I'm working with:
var rel = $(this).attr('rel');
var citation = rel.split("-")[0];
window.scrollTo(0, $('[name = ' + citation + ' ]')....
I have a search page that I'm implementing as part of an ASP.NET + MVC + jquery site. The search query scores each result that is returned as part of the results set. i.e. Higher score for closer match.
Because the results set can change, and because the algorithm that scores the matches is somewhat intensive, I only want to load the re...
Ok strange behavior when it should work:
The problem is if I don't declare a doctype the CSS works in IE 6 & 7 but if I declare the DOCTYPE it doesn't work. Why???
jQuery:
$('tr:first-child').children().css({
'width': settings.minWidth + 'px',
'height': settings.tableHeaderHeight + 'px',
'overflow': 'hidden',
'white-space'...
I'm getting a pure binary MP3 stream from an ajax call. No headers, nothing. Just straight MP3 bits. (Actually is that really even a stream at all?)
I'd like to be able to play it in a web page (and, if possible, offer it for downloading).
Is this possible? And if so what's the best way to do it?
If it is not possible, what are some...
I'm looking for the world's simplest lightbox. All I want is an implementation that pops up a modal window in the center of the screen and requires a button or other element in the box be clicked before the box is hidden.
With so many lightbox implementations, I'm a bit overwhelmed. What's the simplest, dumbed-downest lightbox that does...
Is there a method using either JavaScript or jQuery to determine what day of the week it is? For instance, if the date a user picks in the box is a Sunday, I can alert them.
Thanks
...
I am using this plugin:
http://plugins.jquery.com/project/updnValidatorCallout
This controls to be validated are inside an updatepanel. Before posting back everything works fine, after a async postback the callout plugin messes up.
I'm initializing the plugin like so:
$(document).ready(function() {
$.updnValidatorCallout.attachAl...
I have a trivial little game I wrote in javascript that creates a wave from where you click. I figured out two ways to make the "wave" move across the screen:
by calling jQuery.animate() with increasingly large times. demo
by recursvely calling setTimeout. demo
The problem I have is that I want the behavior of 2 (columns all grow at...
I use the following snippet to make an element's background lightblue, then slowly fade to whiite over 30 seconds:
$("#" + post.Id).css("background-color", "lightblue")
.animate({ backgroundColor: "white" }, 30000);
Two questions.
First, instead of fading to white, is there a way to fade opacity to 100%? That way I don't have to cha...
My Html looks like this:
<a href="#" id="QuoteTest">Click Here</a>
<ul>
<li title="this" style="position:relative">one</li>
<li title="this" style="position:relative">two</li>
<li title="tha't" style="position:relative" >three</li>
<li title="tha't" style="position:relative...
I'd like to extend a DOM element without extending all of them. That is, I'd like a custom class with its own methods and properties, but also be able to treat it as a div. E.g.
MyClass function(){
this.foo = "waaa";
}
MyClass.prototype.changeText = function(newtext){
// if this extended $(document.createElement("div") someth...
Hey all..
So I am desperatley trying to get some scrolling functionality to work on a page. After not having a luck I decide to just stick window.scrollTo(0, 800); on my page to see if I could get any scrolling to happen. Nothing does happen. I have an accordion that expands and then I want to scroll to a specific element with in it. Bu...
Heres my Situation.
Im trying to relaod a div in a page with load().
I first tryed with a GET. Worked fine with Firefox but not IE8.
After a bit of reading, i found out that i had to POST my PARAM so i went on and did a POST.
The result is just the same. It wont work in IE8. Here is the line im using for the POST.
$(\'#test_1\').loa...
Hi there,
I have a bunch of links on a page that on an action, I run a function and it appends an extra variable like so:
function storeId(uID) {
$('a.special').each(function(){
$(this).attr('href',$(this).attr('href')+'&variable='+uID+'');
});
}
My understanding is, the above would go through each link identified, and grab the ...
I have the code below on a social network site, it loads a file that shows users new notification messages if they exist.
Problem is when I leave the page open for a while, it eventually consumes too much memory on my PC and starts to make firefox non-responsive and throws an error message saying that memory is getting low and asking if...
I am creating a tabbed content interface. The content panels are an unordered list created using a server-side script. I want to add tabs via jQuery to control the panels. The only requirement for the jQuery plugin to work is to have the same amount of panels as tabs (the number of panels isn't always consistent). I need to query how...
Hello,
I'm learning jQuery now, and was reading an article of Jeffrey Way, "You Still Can’t Create a jQuery Plugin?"
Almost everything is clear, but there are some points that I still cannot understand.
Problems begin on the 'Step 3: Building the Plugin', heading title 'For Each...', and next 'Error Checking'.
this.each(function() ...
I have this script that creates a new tab in JQuery. Can you check through code on whether that particular tab has been generated?
Thanks!
function createTab(name) {
var tabName = "#fragment-" + name;
$("#container-1 > ul").tabs("add", tabName, name);
var newTab = $(tabName).css("display", "b...
hi,
I'm using a dynamic jQuery tab widget to add/remove tabs generated programmatically.
How do I check through jQuery and count how many existing tabs are present in the widget?
I'm using this code, but it doesn't work:
$('#container-1 > ul').tabs('add', tabName, name);
var newTab;
if ($('#container-1 > li').size() < 0) {
newT...
In Chapter 14 of Designing Web Interfaces, authors Scott and Neil define the 'Periodic Refresh' pattern and cite Digg's DiggSpy as a canonical example.
I agree that the pattern and its manifestation are excellent ways of serving real-time information to the user.
I'm facing a similar challenge. I'd like javascript (and jQuery) to conti...