jquery

shorthand in jquery

I have this jquery codes: $(document).ready(function() { $("#masthead ul li").mouseover(function(){ $("#masthead ul li").removeClass("cr"); $(this).toggleClass("cr"); }); }); $(document).ready(function() { $("#intUl li").mouseover(function(){ $("#intUl li").removeClass("cr"); $(this).toggleClass("cr"); }); }); ...

jQuery awkward behaviour

I am trying to load a page throughout ajax, the whole page, and formating mine as it finds in the loaded one. Something of a practical exercise. The result of the ajax call is a string containing the page's html. To make it simple, I made an example, with a string containing something of a page itself. <html> <head> <title...

Organising JavaScript / jQuery - alternative to using jQuery's live hookup

Hi, Simple question (I hope). I have a page that contains links that when clicked loads up new content into a specified div. The content that gets loaded (a partial view) contains further links that fire JavaScript code (jQuery). I have been hooking these links up using jQuery's live system. It has been recommended to me that I wire-up...

jqGrid and JQuery UI tabs showing grids expanded only on primary tab (div)

Hi, I have added some grids (jqgrid) to a jQuery UI Tabs object. All the grids on the Tabs child that is expanded by default, displays perfectly. But the grids on the Tab children that are NOT expanded by default, permanently shows the jqGrid small (jqgrid with autowidth=true). Any ideas? Thanks! See http://www.revolucion7.com/wp-cont...

Using Prototype to load a JavaScript file from another domain

Using Prototype, anyone know how to load a javascript file using Ajax.Request from another domain? Or if this is possible? I believe this is possible with jquery, digg do it to load the Facebook API: jQuery.ajax({type:"GET", url:"http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php", cache:true, dataType:"script"}); Sou...

jquery - How do i call the same function with different element id tags?

I am a very new to jquery and am having trouble calling more than one instance of a function. i have a function $('#open_dialog').click(function(){ $("#dialog").dialog("open"); return false; }); To call this function i have an href link with an id tag name of open_dialog. Obviously this works great if it is the only...

Jquery ui, joomla and safari problem

I have a jquery ui slider in place which scrolls the content of a div when moved, here's the code: var paraHeight = $("#descPara").height(); var maxScroll = paraHeight - 250; var activeScroll; if (maxScroll <= 0){ //do nothing } else { $("#slider2").slider({ orientation: "vertical"...

jQuery toggle();

Hi I am loading data dynamically by AJAX into a cluetip (http://plugins.learningjquery.com/cluetip/#). I want to toggle the results from a link like so: $(document).ready(function() { $("#calendarLink").live("click",( function() { $("#result").toggle(); })); }); For some reason the above will not work. Can you sugg...

Jquery Validator plugin, how to validate fields with one error message

Here is the problem i have, i have 3 select lists. Basically its a date to choose like DAY MONTH YEAR and i need to validate 3 of them but with one error message meaning each one of them must be selected or will give an error message. I have it working but i come up with 3 error messages for each field which is not what i need. Here is ...

Preventing jQuery from Loading

If jquery is added in globally used header.php across the site then How to stop to load jquery library only for those pages of site which doesn't need actually? If we can't use more than one header. purpose of question is to not to penalize those page with slow loading which actually don't need. ...

Is there a better way to write this jQuery script?

So the script works, but it seems pretty long. I think there may be some shortcuts I could take, maybe use an array? But I'm new at JS, and really new at jQuery. What it does: I have a list of ten questions, and I want to take a graphic (plus sign) and toggle it when clicked to a minus sign. It will also reveal the answer by using a sl...

FSM (Finite state machine) modelling of a web page's states using jQuery

I am interested in how the kind of behaviour described below, may be implemented, using jQuery. Technical overview: Technically, the behaviour is best modelled by a state machine thus: A page is loaded up and is in an initial state (state A). A page in state A places no restriction on the user, in that a user can do whatever he likes,...

JQuery Integration with JavaEE

I have been able to use Jquery with ASP.NET because I know where to drop the JQuery Library, but I am trying to integrate JQuery with Java Web Applications using JSP's,Servlets, etc. It seems like a trivial question, but for some reason I am unable to figure out where to drop the JQuery Javascript file. ...

jQuery Z-Order Problem in IE 6

I'm having a problem with displaying a div in with the jQuery fadeIn() command. Everything displays fine in IE 7 and IE 8, but in certain versions of IE 6 (SP2 for instance), fields from the grid that the div appears over show through the dialog. Anyone have any hints? I have a screenshot but can't get to an image hosting site behind ...

Dynamic Sliding Panel Using JQuery, based on values from a mySQL database...

Hello everybody, I am in the process of developing an academic toolkit for my university. The problem statement is, the user will be given a list of courses. When one clicks on that particular name of the course, he should get a dynamic slide panel showing the course objective and other details of that course. All these values will b...

How to get a serialized array from a client form to a server using the GM_xmlhttpRequest

I used JQuery.serializeArray() on a form to create an array of objects on a GreaseMonkey application: [ { name: a value: 1 }, { name: b value: 2 }, { name: c value: 3 }, { name: d value: 4 }, { name: e value: 5 } ] I need to use GM_xmlhttpRequest to serve these fields back to...

Find and Replace

I have a table that I screen scraped using the jQuery load function, the function returns a table with text and graphics. The website I scraped from uses relative paths for their images so when I return the code to my page the images are not showing up. I have been looking for a jQuery function to find the tag and either update it to ad...

Difference between a jQuery plugin and a jQuery widget?

Can someone concisely explain the differences between jQuery plugins and jQuery UI widgets? What are the conceptual differences? Why would I choose one over the other and what pros and cons are there for each. What are the differences in the intention and concept for each? I've written both, but I'm not clear on the nitty gritty differe...

ASP.NET MVC Dynamic RenderActions in jquery tabs

Ok, so, that title is a mouthfull... But, I reckon you understand what I'm trying to do. I have a page which contains the jquery tabs control, and I render the different tabs by looping through my model. Now, the divs (that are "linked" to those tabs) are also created with the same loop. Hence I have equal tabs + divs connected to those...

jQuery and IE8: Form action and submit problem

I have some code that isn't doing what I want it to in IE8. When you hit the "preview" submit button, a bit of Javascript jumps in and changes the form's action to franchisepreview.php. This sets a session variable so when you go back to the form you won't loose anything. Hitting "Update" or "Insert" goes straight to a query that inserts...