jquery

Integrate two javascript scripts and handle user events differently

I am building a search form that use two different javascript scripts. This is the form code: $(function() { $('#txtSearch').chainSelect('#link_id','http://localhost/xxx.com/combobox.php', { before:function (target) //before request hide the target combobox and display the loading message { $("#loading").css("display",...

Help with changing how jWYSIWYG editor works

In jWYSIWYG editor, pushing enter inserts <br />s. Instead of this, I would prefer that pushing enter would wrap chunks in <p> tags. WHAT IS OUTPUT line <br /> new line WHAT I WANT <p>line</p> <p>new line</p> Quick examination of the config seems I can't do it without hacking it internally. Do you suggest I hack the plugin, or u...

Is jWYSIWYG editor too buggy for production use?

After reading the comments on this site: http://www.webresourcesdepot.com/jwysiwyg-jquery-inline-content-editor-plugin/ There is a bit of consensus that jWYSIWYG editor is too buggy (especially in the last few recent comments). Has anyone had experience with it in a large production site? I haven't run a huge sample of markup through ...

How to apply class to first button of the div?

I have this html and I want to apply class to first button of the DIV. <div class="button-container"> <button class="save" /> <button class="reset" /> </div> I want to add class to the first button. I want to use jQuery for this solution. ...

continuous loop with divs and jquery

Hi - I'm continuing a previous post, but I thought I'd open a new thread since it takes a different approach and has more actual code. Anyway, I'm trying to get an infinite loop going with divs scrolling through a window (the other post has an image, and the code below works). <html> <head> <meta http-equiv="Content-type" co...

window.close() doesn't work on Firefox, any work around?

Hi, I am trying to close a window using window.close() but this works on IE only but not on Firefox. Has anyone encountered this one and any work around? Thanks... ...

Avoid element to get selected when its dropped with jQuery sortable

Hi! I have a function which let me select a element when its clicked. It goes like this: $('ul.grid li').click(function() { var input = $(this).find('input.select-state:first'); var value = input.attr('value'); if (value == '0') { $(this).addClass('active'); input.attr('value', '1'); } else { $(this).removeClass('active'); ...

json response from the server (how to populate the response from server in selectbox)

Hi all, I am trying to populate a select box (cities related to a state) using the $.ajax method of jquery. I wrote the following in my php script $('#cmbState').change(function(){ $('#cmbCity').children().remove(); $.ajax({ type: "POST", url: "../include/ajax.php", data: "option=getCitiesList&stateid="+$(this).val()+...

(jquery) enabling a submit button when OPTION value selected

Hi! So I want to enable a submit button whenever an option in my select box (#purchase) is selected (so long as the selection is not the default value. Here is the jquery code I put together, which is apparently not very good. :) $(document).ready(function(){ $('input[type=\"submit\"]').attr('disabled','disabled'); ...

Nested Sortable JQuery list doesn't work in IE while it does in FF

Hello everybody, While I'm using this site quite often as a resource for jQuery related problems I can't seem to find an answer this time. So here is my first post. During daytime at work I'm developing an informationsystem for generating MS Word documents. One of the modules I'm developing is for defining a default chapterselection fo...

Simple click event delegation not working

I have a div <div class="myDiv"> <a href="#" class="myLink">somelink</a> <div class="anotherDiv">somediv</div> </div> Now, using event delegation and the concept of bubbling I would like to intercept clicks from any of myDiv, myLink and anotherDiv. According to best practices this could be done by listening for clicks globally (h...

how to find buttons with specified text inside using jquery?

I have this code structure , and i want to search for span that has text "Refund Offline" and then add the class hide_button to the parent tag " button". basically I want to hide the button that has "Refund Offline" text. <button class="scalable save submit-button" type="button" id="id_b5295d98b1d6eb3012e2dfd801ede120"> <span>Refund O...

table structure is not coming properly in FF with jQuery

Hi All, I have one table having 10 rows.Now on page load lets say first 7 rows are showing and I have blocked last 3 rows using jQuery. Now on click of a span I want to show last 3 rows..its working fine in IE but not in FF. in FF, when I am loading last 3 rows , the first 7 row css stops working , I mean from 2 nd col, it starts to be r...

Why jQuery do this: jQuery.fn.init.prototype = jQuery.fn?

Little extended question is why jQuery do jQuery.fn = jQuery.prototype = { init: function() {...}, f1: function() {...}, ... }; jQuery.fn.init.prototype = jQuery.fn; Why not simply add f1() etc into init.prototype? Is it only aesthetic or there are some deep ideas? ...

jquery fade content

hi to all I have navigation menu that once the user click then change and fade the content. The problem is even the child node became hidden. If I remove all the child node of my div id="witness" and id="believe" then it works fine. How to exclude child node of div id="witness" or id="believe"? Thanks in advance. here is my javascr...

Weird behaviour of jquery's hide/show with the 'slide' effect. How to change?

When doing $('.mydiv').show('slide', {direction:up}, 1500); //syntax may be a little off jQuery seems to - just before starting the animation - make room for the soon to be showed div. This creates a non-smooth effect making all elements below the showed div shift away in one big go. I would like to see the elements below the div mo...

The jquery is not displaying correctly on IE7

I have an application where I'm using nested jquery, when I want to see the content of the accordion, it does not display until i mouse over on the content. I don't have this problem on firefox. Has any1 face this problem before? Any advice? ...

Reload iframe in another jquery tab

I have jquery tabs, in which one tab has an iframe and the other has some settings for the content in the iframe. When i update any content in second tab, how can i make it to reflect in the iframe of first tab.? ...

How to store the value?

I want to make the application like below. First there is a page with four radio buttons. The user clicks on any of the radio buttons but doesn't save and he goes to another page. Then if he comes back to same page with the radio buttons it shows the selected radio button before he goes to another page. How can I do it by using jQuery ...

JQuery Validator Plugin

I have managed to implement the validator on a form, and is working fine for all my needs apart from a crucial last one. Does anyone know how I would go about (or whether it's even possible) to extend or create a validation message that is purely a warning but still allows the form to be submitted (i.e. the field is still valid). To il...