jquery

jQuery - Setting selected text on Chrome doesn't work.

Using jQuery. Setting the selected text in Chrome doesn't work. Example: $('#selectGroup :selected').text(name); This code works in FF, but doesn't work in Chrome. Why? ...

jQuery UI Dialog - Position

Hi I'm trying to fix a dialog. The sticky property sticks it, but I need to fix the dialog where the div is. Basically I need the dialog behave like an regular div (if I set it inside an table, it stays there. Not in the middle of the screen). I know this is related with position effect, but I can't figure out how to make this. Thank...

How to set background-position-x with IE

I'm tired of setting background-position-x with IE, $('.scroller').css('background-position-x', posX+'px'); is not woking, any other methods var posX = $('.scroller').css('background-position'); if(typeof(posX) === 'undefined') { posX = $(' .scroller').css('background-position-x'); } posX = posX.split(" ",1); ...

jQuery window resizing

$(document).ready(function(){ WinSize = $(window).width(); var currentPosition = 0; var slideWidth = WinSize; $(function(){ $(window).resize(function(){ slideWidth = WinSize = $(window).width(); }); }); var slides = $('.slide'); var numberOfSlides = slides.length; // Remove scrollbar in JS $('#slidesContainer'...

iframe.load not working

iframe.load(function(){alert("1")}); not working in ie6 why? ...

passing parameters to a jquery javscript function?

i have this jquery function that i want to pass topic parameter to, i just dont know how to pass it lol :)). the jquery function: function loadPage(url) //the function that loads pages via AJAX { url=url.replace('#page',''); //strip the #page part of the hash and leave only the page number $('#loading').css('visibility','v...

Jquery selector help

I have the following: <form id="my_form"> <input type="checkbox" name="a" value="a"> Check <img src="..." /> </form> To handle the check and uncheck events I do (and this works): $('#my_form :checkbox).click(function() { if($(this).is(':checked')) { //... } //... }); My question is: inside of that click function, h...

jquery iframe scroll

Hello! I have an iframe in my page and i want to create a button that when i press it the page in the iframe scrolls down... Can anyone help? ...

cascading dropdownlist not working

Hello, i tried to change an cascading dropdownlist example http://www.codedigest.com/Articles/jQuery/224_Building_Cascading_DropDownList_in_ASPNet_Using_jQuery_and_JSON.aspx But i get always the message "Microsoft JScript runtime error: Object expected" Maybe someone has an idea? <asp:Content ID="Content1" ContentPlaceHolderID="cont...

Stub out the global namespace to enable for lazy script loading

I am using jQuery UI and a few other JS libs which in total make for quite a chunk of JS (even minified and combined). My idea is to not include a script tag in the page but to stub out all functions that I defined as well as the $ sign for jQuery so that my inline JS on the page can still call them but will hit the stub. The stub will t...

how to change classes on click

Hi All, I have structure: <table style="width: 100%;"> <tr> <td> <a href="#" class="yy">one</a> </td> </tr> <tr> <td> <a href="#" class="xx">Two</a> </td> </tr> <tr> <td> <a href="#" class="xx">Three</a> </td> </tr> </table> ...

fancybox prevent close click outside of window

I am trying to prevent fancybox window from closing when the user clicks outside of the fancybox window. I am using fancybox Version: 1.3.1 on IE7, I have tried the following but I have yet to succeed. Any help is very much appreciated. http://stackoverflow.com/questions/2115234/on-fancybox-1-2-6-close http://stackoverflow.com/question...

Is it possible to force jQuery to make AJAX calls for URLs with gzip/deflate enabled?

I have a web service that is willing to output gzip/deflated data. I've verified that the service will respond with raw JSON or with gzip'd JSON using wget and curl. I want to consume this web service using the jQuery AJAX call. By default, the $.ajax call that jQuery provides does not add the "Accept-Encoding: gzip" HTTP request hea...

get current index jquery

hi i'm using a script made by http://snook.ca/archives/javascript/simplest-jquery-slideshow so basically the code i have now is $(function(){ $('.fadein img:gt(0)').hide(); setInterval(function(){ $('.fadein :first-child').fadeOut() .next('img').fadeIn() .end().appendTo('.fadein'); }, 6000); }); I wonder if it's poss...

I need to implement an Auto complete Utility using Struts2-JQuery plugin.

There is an inbuilt tag for this purpose. User enters a character in the textbox, Strings which start with the character entered should be displayed in the form of a list. The item selected from the list should be populated in the textbox. P.S: The examples and demo available display Strings that contain the character entered. But I w...

Example of using datatables jquery plugin with a WCF service

Does anyone know of any samples that use the DataTables jquery plugin with a WCF service? I'm attempting to use a WCF service with the JavaScriptSerializer which unfortunately seems to return dodgy JSON by adding extra backslashes. However the DataTables would seem to provide a way to work around that given that the retrieval of the JS...

Change a value of a hidden field in the markup?

Is there a way to change a value of a hidden field in the markup (with jquery or js) so I could use that new value once I'm out of the script (i.e. in a different script that would be triggered later)? Lets say : <form> ... <input type="hidden" name="prev_address" id="prev_address" value="no"> <input type="hidden" name="prev_job" ...

javascript: alt attribute with special characters

Possible Duplicate: Alt attribute encoding with JavaScript I can't seem to assign special characters using javascript in alt tags and have them render in any browser. Without javascript, special characters in alt tags render fine (Pepsi): <img id="pic" src="path/to/image.jpg" alt="Pepsi&trade;" /> However, when assigning th...

JQuery Navigation Table. Showing and hiding every other row?

I have a table layout that I am using as a navigation bar. It's like a tree-menu where some rows are headers for the ones below it. It goes a little like this (some tags removed for readability): <table id = "QLM"> <tbody> <tr id = "QLM0"> <tr style = "display: table-row"> <tr id = "QLM2"> <tr style = "display: table-row"> <tr id = "QL...

Skip section of accordion if select option equals certain option

Hi I have been working on quite a complex accordion/form recently and have a select dropdown box on one step, i want it to skip to the last section (7) if the user has chosen the option yes with the select box. i tried to use the code below but it didn't seem to work, it just replaced the accordion with empty white space like it couldn...