jquery

jQuery effects disappear after ASP postback in Firefox

I have a ASP updatepanel, within that panel I have some controls which got jQuery effects connected to them. The effects work perfect before posback, after postback the effects only work in IE not in FF. To get it working in IE I added the following to my MasterPage: function pageLoad(sender, args) { // Initialize jQuery effects. }...

Test page to verify if jQuery code works

Is there a web site that allows to edit a simple HTML fragment, insert jQuery code, and verify if the jQuery code has the desired effect? ...

jQuery wait for all select options to load

Hi, I have a select box object and an ajax function is called OnChange using the selected value as an input. I also want to call the the same function when the select box is first loaded. I use jQuery .load, but the ajax function is called before any of the options are loaded and the input to my ajax function is undefined. Does anyo...

jQueryUI Accordion effect selected tabs

Hello, I am using the jQueryUI Accordion effect in a webpage. However, I ditched the pre-packaged CSS sheet in favor of my own. The only problem is, I don't know how to make my tabs stay a certain color (they have a hover color-fill effect) when they are selected. Can anyone help? Below is a picture so you can see what I mean (I have my ...

JQuery shortcut for callbacks like function(){ mycallback() }

Hi javascript developers, Is there a way to reduce the boilerplate required to define a function in jquery? (My example is with a callback but it could apply to any anon function.) $('#dialog').load('/index.cgi',{p:'myform'}, function(){ ajaxify_form() }); What I would like is to do $('#dialog').load('/index.cgi',{p:'myform'}, ...

How to delete current row with jquery datatable plugin

i have a column with buttons in a table an i am using jwuery datatable plugin. The buttons say "Remove" and the idea is that when you click on that button it deletes the current row in the table. when i call fnDeleteRow it seems to work the first time but no any further time for that row so it looks like its not really deleting the row...

Hide all the id in JavaScript

I need to hide all the tags which has the ID 'media' E.g.: `<div id='media'>contents</div>` `<div id='media'>content</div>` How to do this using JavaScript? ...

Loading my Greasemonkey script after another GM Script Loads

I have two greasemonkey scripts loading on a particular url. How do I make sure my second GM script doesn't load until the first GM script completes building it's page elements. Also how do I control the order in which the GM scripts load/run? ...

how do i get the row (and its index) in an html table from a button click inside a cell in that row.

question is in the subject ...

First jQuery Plugin: TagCloud

This is my first jQuery plugin. Can I get some pointers? It's currently not working... ; (function($) { $.fn.tagCloud = function(options) { options = options || {}; var maxPercent = options['maxPercent'] || 150; var minPercent = options['minPercent'] || 100; var retrieveCount = options['retrieveCount'] || function...

How to add html attributes in this JQuery

Hi, I'm still new in this area, have few questions. I have JQuery from this site: http://goskylar.com/wp-content/demos/jquery.hyphenate/ It is solve my problem regarding hyphenation. However, when I put some html tag such as <strong> or <u> the result shows no effect. My question is: Where and how should I add the function for css att...

apply plugin to a new element in the DOM (jquery)

I am using the jquery tablesorter plugin and applies it to a table with id : #table my search facility requests for results via ajax and replaces the table with a new table of the same id if my code is like this : $('#table').tablesorter(); what do I add to apply to make the plugin work on the new table? (I know of jquery's live eve...

jQuery events work in Firefox, not Chrome

I registered some click events in my code. They function properly in Firefox (Windows and Mac) but don't execute in Chrome (tried Windows and Mac beta). The purpose of the JavaScript is to show the correct number of text inputs based on the value of the select element. Here is the code: http://www.savetherobots.org/users/jkost/substi...

How to get container danymicly in Jquery.post.callback

I have some form containers with a form in each, form.submit function like this: $('.form-container form').submit(function(){ $.post(url,data,callback); }); callback function: function callback(data){ container.html(data); } Question is, how can I get the container, are there any way that I can pass it from submit function...

Passing divs information

I have a series of divs that have similar ids with the exception of a unique # at the end (cartbtn0, cartbtn1, etc.). I have created one generic function that will work across all the divs using a wildcard, but I need to be able to capture the unique # of the div that was clicked in order to replace the 0 in #cartbox0:hidden. Can anyone ...

show / hide submit button

HOWTO? show submit button only if one or two needed inputs are filled with a value but if you remove on of the needed values, the submit has to disappear. should be done with keyup i think. any idea? ...

How can I find an option with a specific value using jQuery.find?

var prefix = document.getElementById("actionsum").value; $('#actionsum') .find('option') .remove() .end() .append('<option value=""> </option>') .val('') .append('<option value="A0">A0</option>') .val('A0') .append('<option value="A1">A1</option>') .val('A1') .append('<option value="A2">A2</option>...

ajax call with jquery - parsing incoming feedback data

I got a server-side script that I call with jQuery ajax method. It can take quite a while for it to process data set. After each row of input data is processed, it prints out a "OK <row id>" to output. The content type is plain/text. What I want is to get this output in my jquery function, parse it as it comes and display some kind of ...

Creating a slider bar using jQuery 1.2.1

Hai, I've got a project which uses jQuery 1.2.1, and I cannot update the version. I need to create an incremental slider bar the same as the jQuery UI example (http://jqueryui.com/demos/slider/#steps). The legacy download of jQuery UI is for 1.2.6 so even that will not cut the mustard. Does anyone know of a way to emulate the same func...

Jquery add image, no click event

I'm appending a table row with an image that when you click it, it fires an event. However it looks like you can't add a 'clickable' image dynamically. all the previous rows with images are identified by their class attribute when clicked (they loaded with the page). What I want to avoid is using the live event and making a seperate f...