jquery

Use function inside jQuery AnythingSlider plugin function outside plugin scope

Hi guys - I'm trying to integrate Chris Coyier's AnythingSlider (http://css-tricks.com/anythingslider-jquery-plugin/) with the YouTube API. When the video state is "play", I want to fire 'startStop(false)', and on video state 'pause' to fire 'startStop(true)'. But how can I use a function that's declared inside a plugin? I tried with so...

Am I crazy? Demos on jQuery's 'effects' page not working in any browser

Hi all, I want to make sure I'm not crazy, because I can't get any of the effects demos to work on jQuery's demo pages. I thought it might be my new Firebug version (1.5.2) or Firefox in general, but they're not working in IE or Chrome either. Here are the links where the demos aren't working. One is for highlight, and the other is for...

Using jQuery's $.getScript(), can I sense 304 Not Modified Headers?

I have an application (a widget) where I use $.getScript() on a 5 minute timer, loading a file every five minutes. I then take the contents of the file I just downloaded, and rebuild my page, so that my widget can update. Most of the time, however, the file is unchanged, and firebug displays a 304 Not Modified header every 5 minutes, a...

How can I disable Ctrl+A (select all) using jquery in a browser?

I'm trying to prevent information to be copied from a page (for non-technical users of course). I know how to disable selecting text using the mouse. The following jquery code works: $(function(){ $.extend($.fn.disableTextSelect = function() { return this.each(function(){ if($.browser.mozilla){//Firefox $(this).css('...

onChange event never firing for <select> in Internet Explorer

I'm using jQuery to bind an event to the onChange handler of a as follows: $("#accounts").change(function() { DoSomething(); }); The problem I'm having is that, while everything works fine in Firefox, the event never gets fired in IE. I'm aware of the fact that IE handles the onChange event differently than Firefox as mentioned here...

What is the JQuery equivalent of YUI buttons?

http://developer.yahoo.com/yui/button More specifically, I want radio buttons. that can be checked/unchecked. ...

Pagination number elements do not work - jQuery

Hello, I am trying to get my pagination links to work properly. It seems when I click any of the pagination number links to go the next page, the new content does not load. literally nothing happens and when looking at the console in Firebug, nothing is sent or loaded. I have on the main page 3 links to filter the content and display it...

jquery: mouseleave event seems to fire when it's not supposed to

Given the following html table and script shown below I am having a problem where the mouse leave event appears to fire right after the mouse enter, even if I don't move the mouse out of the row. <script type="text/javascript" language="javascript"> function highlightRows(iMainID) { $('tr[mainid=' + iMainID+ ']').each...

Maintaining state of dynamically-generated checkboxes

I'm using jquery to dynamically create a list of checkboxes. However, when there's an error, I need to preserve the state of the checkboxes. I have this working, but it seems a bit kludgy: get the value from the posted form, put it into viewstate, put the value of the viewstate var into a hidden field, get the value of the hidden fie...

equivalent of jQuery's "load" in prototype

Hello, I am trying to find an equivalent for the following jQuery javascript: var x1 = setInterval(function() { $('#status').load("processor.php", {value:'name'} );}, 5000 ); I need to use Prototype for other applications on the page, and when I throw both jQuery and Prototype libraries in there they will not cooperate. Thank you, ...

How do I select a row in a table based on what ddl option is selected MVC?

I have a table with a few rows of data. I would like to display a row based on what option is selected on the ddl. how do I do that? <script type="text/javascript" language="javascript"> function optionSelected() { alert('HELP!!'); } </script> ... <select id="optionSelect" onchange="optionSelected()"> <option i...

AJAX Return Problem from data sent via jQuery.ajax

I am trying to receive a json object back from php after sending data to the php file from the js file. All I get is undefined. Here are the contents of the php and js file. data.php <?php $action = $_GET['user']; $data = array( "first_name" => "Anthony", "last_name" => "Garand", "email" => "anthon...

jQuery, how to trigger an href click on when a parent row is clicked

I have a table and in each row is an an anchor element. How would I go about triggering the click of the href if the parent row is clicked anywhere in the row? ...

Jquery News Rotate

Hello, I'm trying to make a news feeder that grabs 5 dynamic items at a time, fades them out and inserts the next 5. I'm using the JQuery news ticker right now, but it only grabs one child element at a time. As you can see: /* * JqNews - JQuery NewsTicker * Author: Gravagnola Saverio and Iuliano Renato * Version: 2.0 Verticale */ va...

Is there a limit to the number of "$document.ready" functions you can have on the same page with jQuery?

I have a simple JavaScript file that has three jQuery "$document.ready" functions. All three attach a facebox modal dialog to various links on my page. This means I'm calling "$document.ready" three times. First of all, is this advisable? Is it something I should avoid doing? The app works fine but I'm wondering browsers prefer on...

jQuery animate background position in chunks?

I'm trying to use jQuery to make a background position of my span go down 10 pixels every second. What is a good way to do this? I've been playing with jQuery animate, delay, CSS, and some setTimeout functions but I can't get anything to work. Suggestions greatly appriciated! I'm trying to make my y-position go from 0 to 100 in increme...

Passing Data in Dynamically generated links with Javascript

The Question: Here is how I am passing data with js. Is this a good way to go about it or am I doing it wrong? It does work but it seems... suspicious, I suppose, to my relatively noob JS skills. I have a custom grid plugin that generates a grid of data. Let's say it generates rows of user names with their id #, role, some dates, etc. ...

Why would html source not change when the DOM is updated dynamically

I had posted one question earlier http://stackoverflow.com/questions/2381621/jquery-inconsistency-in-setting-readonly-attribute-in-ie-8-and-ff-3-5-8 and was quite happy with the answer. But I did notice that if you update (any??) DOM elements dynamically, then view source (using browser's view source) I find the the updated DOM element ...

jQuery onmouseover + onmouseout / hover on two different divs

Hello everybody, I've got a Problem: Here a part of my HTML: <div id="div_1"> Here Hover </div> <div id="div_2"> Here content to show </div> And here a part of my jQuery Script: jQuery('#div_2').hide(); jQuery('#div_1').onmouseover(function() { jQuery('#div_2').fadeIn(); }).onmouseout(function(){ jQuery('#div_2').fa...

Accessing Element Count and Values Within a Hidden Div

I'm having trouble grabbing the TR count in JQuery of a table that inside a DIV set to be hidden. Here is an example: <div id="questions" style="display: none;"> <table id="tbl_questions"> <thead> <tr> <th>Question</th> <th>Weight</th> </tr> </thead> <tbody> <tr id="q0"> <td id="td_question0">Some Question 0</td> <td id="td_...