jquery

Writing a jquery plugin to do text replacement

Let's say hypothetically I want to replace all 'a' in a string with 'b' 'abc' -> 'bbc' I want to run this on various strings: var str1= 'abc' var str2= 'adf' var str3= 'abvxvb' var str4= 'ae54' I'm trying to write a jquery plugin that does this. So I can do str1.a_to_b(); and get the desired result. (Actually having the syntax in a...

jQuery dialog iframe loading once in IE and twice in other browsers?

I have a jQuery dialog whose content is defined by an iframe. Until the dialog is displayed, the content of this iframe is invisible. In IE, this content and its associated javascript is executing, so that when the dialog is displayed, it is evident that the javascript has already completed all its loading work. But in non-IE browsers...

Absolute Positioning in JQuery after loading page and positioning elements.

I want to position an element in normal css relative to the element before it, and then once it's been initially positioned makes its position independant of the one before it. For example, when you click on a 'widget' in the sidebar, it collapses, and all of the 'widgets' below it move up. I don't want them to move. Thanks. ...

How to use jQuery to show a page returned from a POST in a dialog?

I'm wanting to use the jquery dialog to open a modal dialog, and in it display the returned page from my server that results from a POST. How can I do this? Right now I've got something like this: var ser = Form.serialize(); $.post("myform", ser, function(result) { $j(result).dialog({title: "Add Shift"}); }); But it's shows 2 dialo...

Jquery Fade Not Consistant

Hello, I am using the Gallerific plugin on this page: http://staging.asla.org/test/LWSother/furniture.html. The fade doesn't appear to be consistent across all of the images. When clicking through the first "page" (images that are numbered to 10) the fade is subtle. but when clicking on the third or fourth purple box the fade is non-exi...

jQuery Image Map Question

I'm working on an image map of the united states where a user rolls over the image and that states information displays on the right side, you can see it here: http://www.quiznosforsale.com/test/ Now I need to have that rollover effect stop when one clicks on the state so that they could potentially click on the information that appear...

Loading HTML content containing inline script via jQuery

The Background I run an ASP.NET site using Graffiti CMS for a local charitable/service organization. The leaders of the organization want to start integrating a third-party back-end management system that exposes content as full HTML pages. One of the pages, the officer list, uses inline script to load pictures or placeholders (dependi...

Call Scroll only when user scrolls, not when animate()

I have a few links across the page with the purpose of "going to the top", accomplished by scrolling the page to the top with a nice animation. I've noticed that sometimes while the page is scrolling the user will want to scroll back down, for example, but this is not possible. The screen will only stutter but will continue animating unt...

server side processing fails on datatable plugin in jquery

Hi, I am using the jquery 'datatables' plugin from http://datatables.net/ (I haveposted this on their forum but am posting here as I am not sure how fast it will get answered there). However I am having troubles getting the data to load into the table. I am trying a very simple example but it keeps coming back saying "Microsoft JScript ...

jquery mouseover / mouseout problem

I have a page with a list of elements display (items) - which are drawn dynamically, hence the live. When a user rolls over an item, I would like them to switch to a class that is "on" and then when they roll-off (mouseout) the item goes back to normal. The items turn on with the line of code below, but do not turn off. Suggestions? $('...

Is there a document that explains jQuery's code?

I have been going through the core jQuery code and had a few "why did they do it like that" moments. Now, I'm in no way that great at JavaScript programming, but some things seemed a little different in jQuery than what I would usually do. I know they probably have to think more about optimisations then readability etc, but I am still c...

Jquery binding event with Map Hilight plugin

I'm trying to use the Hilight plugin for an image map rollover. You can see it here: http://www.quiznosforsale.com/test/ I want to stop the rollover effect when someone clicks on a state - allowing the user to click on information on the right side w/ out having the map switch to a different state. How might I bind this event and the...

How to make a label change to a text box using jQuery

I have some labels that I want to allow users to edit. Is it possible to do this and if so how (using jQuery). When a user clicks a label, it turns into a textbox, which has the existing "label text" contained within. When the user then edits the label and clicks somewhere other than the text box, the value is saved. This might actuall...

Question about jquery - why/how is everything $() based?

Hi, I know a bit of javascript, and can work fine with jquery. i just don't get why everything is referenced from $(). My understanding is that $ is never needed in javascript (unlike for example php, where every variable is prefixed with $). ive looked through the source code and it doesnt really make sense. Is is just $ is the functi...

What is jQuery about?

Is jQuery a client-side or a server-side JavaScript library? ...

How to remove <li></li> from ul?

how to remove a particular <li></li> from the ul list? i am adding it dynamically... and i need to remove it when the user click on clear. how can i do that? ...

how to select drop down value from .cs and and assign in javscript

hi, <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(document).ready(function(){ $("#theSelect").toggle(0); $("#activate").click(activate) }) function activate(e) { $("#theSelect").toggle((e.target.checked)); if (!e.targ...

How to create function for providing before/after submit event in JavaScript based on jQuery?

First, I love a concept of jQuery about handler event. Please look at the following code. $('#someid').submit(function() { // some logic for checking input data before submit return isValid($(this)); }); But I have some problem when I try to create some indicator for displaying submit process. Because jQuery has not any functi...

Jquery UI Tabs - slide

How can I switch tabs by sliding them horizontally? Currently I have: $("#tabs").tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); I'd like an effect similar to this. Thanks! ...

Jquery UI Tabs - open link inside tab via ajax

How can I open a tab and load a link via ajax from another tab. Eg: User clicks link inside #tab_a #tab_a hides #tab_b shows with .loading applied Content is loaded via ajax into #tab_b .loading removed from #tab_b I'm using Jquery UI tabs Thanks! ...