Hi
I have a table that has some rows in it.
Here is an example of my table just with alot less table rows.
<table>
<tr>
<td>bob</td>
<td class="CheckThis">0 </td>
</tr>
<tr>
<td>Jim</td>
<td class="CheckThis">3</td>
</tr>
</table>
Now I want to look at the second table cells and get rows back that have value greater...
$.widget("ui.myWidget", {
_init: function() {
//start
alert('Hello World!!!');
}
}
I have the above widget/ui
when i call it like so...
<div onclick="$('#id').myWidget()">
Click Me
</div>
i get the "Hello World!!!" alert box.
if i click it again then nothing happens.
i don't know if im missing something... bu...
Hi,
I a couple of issues using Tablesorter 2.0.3.
The first issue is when I set a colspan on my table. Basically when I do this as below it doesn't sort the respective columns.
<table>
<thead>
<th colspan="3"></th>
<th>Four</th>
<th>Five</th>
<th>Six</th>
<th>Seven</th>
</thead>
<tbody...
I was reading about cookies and other related client-side storage options, and read about using window.name as a data cache of sorts:
http://en.wikipedia.org/wiki/HTTP_cookie#window.name
While it certainly has things that make it less desirable - and I won't sugar coat it, it is definitely a hack in the most true sense of that word - i...
I want to extract the background from this CSS and then use it to set the page's background-color:
.ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc url(images/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
The jQuery I have so far:
$(function() {
var color = $(".ui...
Forgive my ignorance as I am not as familiar with jquery. Is there an equivalent to dojo.hitch()? It returns a function that is guaranteed to be executed in the given scope.
-- edit --
As requested, here is an example. I use hitch very frequently to ensure callbacks are executed within the right object. For example, let's say I have a u...
Im using the following:
url=location.href
fname=url.match(/.*\/(.*)\./)[1]
document.body.className=fname
This takes part of the URL and adds a class to the <body> tag with the text extracted from the URL.
However the problem with this method is the class only gets applied providing doesnt already have a class assigned.
Im really l...
I have a simple function which I want to run on all elements with a certain class. I want this function to be run as soon as the DOM is loaded; not upon an event handler.
Below is the code that will run on an event handler like hover. How do I make it run as soon as the DOM is loaded?
$(document).ready(function(){
var displayname ...
I have been under the impression for that JavaScript was always asynchronous. However, I have learned that there are situations where it is not (ie DOM manipulations). Is there a good reference anywhere about when it will be synchronous and when it will be asynchronous? Does jQuery affect this at all?
...
How can I get same effect like this
http://bavotasan.com/demos/fadehover/
But only for anchor tags not for images, let say I have anchor background blue and I want it to change to red but with this effect, how can I do that? thank you
...
Hey,
I have a question regarding jQuery and image fading. I have a bunch of images and I would like to fade each one sequentially to full opacity when you load the page. My html code is below:
<div class='mod'>
<img src='image-src' alt='' />
<div class='mod-text'>
<h2>Title</h2>
<p>Caption</p></div>
</div>
<div class='mod'...
(function($) {
$.fn.myFoo= function (o){
this.element = $(this)
options = jQuery.extend({
name: "defaultName",
size: 5,
global: true
}, o);
_min = function (){ //am i private method?
alert('dud');
}
max = function (){ //am i public method?
alert('max');
}
ret...
Hello,
I'm trying to animate background-color,color and border color to change with jquery but for some reason border color is not changing any idea why? here is the portion of jquery code :
$('#tabbed a').hover(function() {
$(this).animate({
backgroundColor: "#FBFBFB",
color:"#FD7A24",
borderCo...
What I would like is to count the number of lines in a textarea, e.g:
line 1
line 2
line 3
line 4
should count up to 4 lines. Basically pressing enter once would transfer you to the next line
The following code isn't working:
var text = $("#myTextArea").val();
var lines = text.split("\r");
var count = lines.length;
console.log(co...
I am just delving into using jQuery and I want to start off by using good coding logic. I am developing an upload site where users can select "upload from computer" or "upload from url". I have two links above the content where users can choose to upload from their computer or from a url, and I want the content to change with jQuery (wit...
Hello,
I'm learning JQuery, and I'd like to isolate basic functionalities. On my 'Index" page, there is only one item, an 'AJAX.Link' displaying the following message 'Say Hello!". here's the mark up:
<div id = "helloDiv">
<% = Ajax.ActionLink("Say Hello!",
"Hello",
new AjaxOptions {UpdateTarge...
I'm using google map API along with the MarkerManager. I load the 2 javascript libraries by JQuery.
Here is my Javascript:
function initialize() {
$.getScript('http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js');
$.getScript('http://maps.google.com/maps?file=api&amp;v=2&asy...
I am using Uploadify to upload files. Problem is, I need to inform users of any error during processing of those files.
Uploadify has onError, onComplete, and onAllComplete even handler but I do not know how to trigger these events so that users are informed of what is going on.
Do I need to send JSON string? There is a clue here and h...
Is it possible to use a string from an elements CSS class as an array name?
I'm looking for a smarter way of storing default animations that may grow over time to include more options in the array.
Example
JavaScript (jQuery): -
var a1 = ['red', 'pink'];
var a2 = ['green', 'lime'];
var a3 = ['blue', 'cyan'];
$('ul li').click...
I am trying to wrap a certain number of elements in a div. The problem is that the number of elements can vary based on the user's input. So the number of elements could be 2, 3, 4, or even more. I have a variable that tells me how many elements should be wrapped. So, for instance, my page may have this:
<div class="test"></div>
<div cl...