jquery

How to prevent JQuery change event from triggering when select's HTML is changed?

I have a select element that has a change event attached so that, when the user selects a new option, that text is placed into a corresponding input element. That's working fine: $("select[name='" + dropdown_name + "']").live("change", function() { text = $("select[name='" + dropdown_name + "'] option:selected").text(); $("#" + ...

jQuery access element by id

Hi This may be a simple question. I need to access an html element using jQuery in the following way: var element_ID = "my" + "name" +"xyz"; Now I want to access/manipulate the element whose ID I have stored in 'element_ID' as above. This doesn't work : $('#element_ID') Please let me know the correct way to access the element store...

What is the best way to make the Yahoo media player autostart, jQuery?

Yahoo has a mediaplayer to play media on a webpage: http://mediaplayer.yahoo.com/ but there is no option to make it auto start. What is the best way to make it autostart, by hacking into the code, or it can also be using jQuery to "click" on one of the media to auto start it, although, how do you know the Yahoo code has finish ini...

In javascript functions, can you set this.function = function?

I have run into this jquery plugin and i quite understand how this works: $.functionone = function(){ function setOptions(newOptions){ ... } this.setOptions = setOptions; } What i dont understand is what does this actually do? this.setOptions = setOptions can you call a function without parenthesis? What is the re...

How to get JQuery to accept a JSON reply?

Hi all, Here's some simple Javascript: (function($){ var ajax_callback = function(data) { window.location.hash = data.h1; }; $('.clickable').live('click', function() { $.post('server.fcgi', {}, ajax_callback, 'json'); } ); })(jQuery); The server is a c++ binary (yes, i know) that spits out (through...

jQuery's click() is not clicking?

I thought jQuery's click() can let us add a handler or just click on an element? However, I tried: $(function() { setTimeout(function() { $('a').first().trigger('click'); // or click(), the same }, 3000); }); and waited 3 seconds and it won't click on the first element in the ...

multiple events not working in IE

Hallo Everyone ,i have some issues , i have attarched draggable(), droppable() and slideout() event to a dynamically created div, but after the droppable event the slideout() event does not for IE but for other browser it functions perfektly.here is my jquery code $(xml).find('USER').each( function(index) { ...

jQuery plugin jGrow not working

I have the following code, in which jGrow is not working. I have included Javascript jGrow file. Textarea doesn't adjusts its size according to lengtht of text, instead a scrollbar appears in textarea <html><head> <title>jGrow</title> <script src="jquery.js" type="text/javascript"></script> <script src="jgrow.js" type="text/javascript">...

call function in jquery-ajax

hello all i have a show function in my test.php page , how may i call show() function in ajax instead url:test.php in following code $.ajax({ url: **'test.php'**, success: function(result) { alert(ersult); } }); ...

Jquery - Truncate Text by Line (not by chart-count)

Dear All, I need a Jquery script to truncate a text paragraph by line (not by chart count). I would like to achieve an evenly truncated text-block. It should have a "more" and "less" link to expand and shorten the text paragraph. My text paragraph is wrapped in a div with a class, like this: <div class="content"> <h2>Headline</h2> <p>...

Suggest Prototype/jQuery Widgets

I am revamping a website that (now) uses Prototype framework. In the process of revamping, I realized that the site was using about 7-8 JavaScript widgets from various sources. I am removing all JavaScript widgets and replacing them with Prototype based counterparts. Can you suggest tried and tested widgets for following functions: Pop...

jQuery's click() can trigger event handlers only for DOM 0 and event handlers registered through jQuery...?

[Update:] This question is related to: what does jQuery's click() do? http://stackoverflow.com/questions/3130539/jquerys-click-is-not-clicking The following code: <div id="oneDiv"> some content </div> <p> <a href="http://www.google.com" id="clickme">Click Me</a> </p> [ ... ] onload = function() { $('...

expandable css box

How to create a floating box which can be expanded using an expand handle on the right bottom corner. The expanding should occur both vertical and horizontally. ...

Possible to disable/make item not visable in select list?

Is it possible to make an item disabled/not visable in a select list? What I'm trying to accomplish is to, depending on a number of checkboxes, if they are selected, the fields should appear in the dropdown. However, I do have manditory fields that always should be in the dropdown and it should all be in a serten order. Checkboxes: <...

jQuery validation plugin. Validation not working after post back

I have set up validation on a .Net form with the JQuery plugin, everything works on page load, but after a post back the validation stops working. Then if I empty a requiered field and try to submit, when my .Net validators catch the problem client side, then the live validation on the fields starts working again. Here is a small code ...

Jquery Plugin Drag & Drop sample

Hello All.... I have a requirements, where I have to implements the drag & drop functionality for end client. From where end - client can drag a table fields in which they are interested. and even remove the dragged field back to the list. It would be great if anybody can provide me some demo link with source code... Thanks in advanc...

Variables and jquery ojects

I am using variables to hold jquery objects as $mydiv = $('#somediv'); Now I would like to extend this to reference a paragraph within $mydiv. Obviously you could declare a new variable $mypara = $('#somediv p') But is there any way to extend the $mydiv variable to find the paragraph it contains. Just can't figure out the notation....

Using jQuery's live() function on calling a plugin?

Hi folks, So I have a plugin - jScrollPane - http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html - which is awesome, but, I want to apply it to an Ajax-generated div. How would I use jScrollPane in conjunction with jQuery's live()? Further info on live() can be found here: http://api.jquery.com/live/ Thanks! Jack ...

Using fadeIn() & fadeOut() with jQuery and Prototype at the same time

Hi there I have a webpage which I'm updating, this page uses Prototype together with Lightbox. I would not like to change the current page to jQuery-only as I'm not sure what else uses Prototype and would break subsequently if I don't include Prototype anymore. My problem is the following: I have a few TD's which I would like to fade ...

HTML5 SVG jQuery problem in FireFox 3.6

Here is my HTML file (jQuery needed and enable HTML5 in FireFox about:config) <!DOCTYPE html> <html> <head> <script type="text/javascript" src="js/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('svg').append("<rect x='100px' y='...