jquery

Accessing object properties from within another object (JavaScript / jQuery)

Hi, I am trying to access properties of a config object from within another object: var myConfigObj = { $myCachedSelector: $('#mySelector') } var myObj = { $selector: myConfigObj.$myCachedSelector, url: 'http://www.someurl.com/somepath' } $.each([ myObj, mySecondObj, myThirdObj ], function() { this.$selector.load(this.url, fu...

Browser Inconsistencies with jQuery :empty. How do I get around this?

Hi there! Firefox and Internet Explorer seem to handle the :empty modifier in jQuery differently. IE funnily enough, works how I want it to, but Firefox seems to count white space as an actual character. This therefore renders using :empty completely useless, as I can't see if a DIV is empty or not. I basically have a set of DIV's wit...

Event displaying in fullcalendar

I want to display event of json from mysql database. But i can't display it in calendar. I think there are some mistakes in events. But i can't point it out. Here is my code: calendar.php: $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $(...

Converting jQuery objects back to xmldocument

Here is the problem: I'm looping over a set of nodes and based on their type i'd like to use the jQuery xslt plugin. var options = { type: "POST", url: "api/dosomething/usefull", data: "orderid=12345", success: function(response) { $(response).find("group").each(function() { if ($(this).attr(type) ...

Options on display of text at 45 degree angle in browser

I have a requirement to display text at a 45 degree angle in the browser. The text is selected via ajax calls from a selection of a lot of values. Text varies in length up to 100 characters. Need to display the first part and the last few characters (I can figure this part out). For example: "This is the text and it can be quite long......

help with hover function

Any help would be appreciated... I am trying to create the effect of a colour photo fading through from black and white. The fade in works but its fading the black and white one OUT first which i dont want...id like it to appear as though the colour is coming through. Then once its hovered off of it should revert back to my original gr...

How can I trigger the jqGrid loading.. message ?

I'm intercepting server response via datatype, but I've noticed that the loading.. message is lacking! How can I trigger it ? ...

jQuery resizable(), accessing the original object

This may seem like an obvious thing, but I can't find it. When using resizable, I want to save the new width of the image, but how do I access the ID attribute of the image that I have just resized? This is my code: $('img.article_image').resizable({ aspectRatio: true, handles: "se", stop: function(event, ui){ // Here I...

Ajax call to parent window after form submission

Hi all, Pardon the complicated title. Here's my situation: I'm working on a Grails app, and using jQuery for some of the more complex UI stuff. The way the system is set up, I have an item, which can have various files (user-supplied) associated with it. On my Item/show view, there is a link to add a file. This link pops up a jQuer...

sending large data .getJSON or proxy ?

Hey guys. I was told that the only trick to sending data to a external server (i.e x-domain) is to use getJSON. Well my problem is that the data I am sending exceeds the getJSON data limit. I am tracking mouse movements on a screen for analytics. Another option is I could also send a little data at a time. probably every time the mouse...

jQuery .live() and Document ready

I'm trying to set a CSS style using .live(). The CSS function: $(".data tr:odd").addClass("evenrows"); Is there a way for this to happen automatically on document ready but still happen for future elements? I've got an ajax event on the page that re-orders a table. I need these newly created rows to have the .addClass applied to them...

Preload images from an Ajax Call

Could someone help me understand how to preload the images from random.php page so the first time it loads it fades in as it should. Currently its got an ugly bulk echo because they're not preloaded but once the page has been run once it fades on after the other perfectly... //Loop through the images and print them to the page for (var...

Jquery Validation - Value can't be greater than

Hi there I'm trying to do some validation on 2 numerical fields and not done much JQuery validation this year. -Product A comes with Product B. -You can have unlimited amount of Product A -But Product B can only have the same or less than Product A For example: If Product A qty is 5 then product B can be 1 to 5. I have tried an vali...

How do I get the entire XML string from a XMLDocument returned by jQuery (cross browser)?

I have tried and failed to find out how to get the entire XML string from the XMLDocument returned by a GET. There are a lot of questions on SO on how to find or replace specific elements in the object, but I can't seem to find any answer to how to get the entire document as a string. The example I'm working with is from here. The "do s...

Ajax replace instead of append

I used the following jQuery example which works like a charm. However it appends the results. What do I need to change to replace the results instead of appending? ...

jquery sending cross domain data via A $.post

I am trying to send data over to a cakephp (mvc) website, via $.post(). below is the code $('#testReq').click(function(){ console.log('Button Works'); $.post('http://play.anthonylgordon.com/usersessions/store/', {data:'test7'},function(data) { //data contains the json object retrieved. console.log(data.status); },"jso...

Visual Defects on Scrolling to Div

I'm developing a new jQuery form framework and have run into a weird styling issue: http://www.jformer.com/demos/page-navigator/ When sliding to the next page the div floated to the left of it starts wigging out during the slide. Does anyone know what might be causing this? This bug is in Firefox 3. ...

jQuery AJAX: collecting multiple asynchronous results

I'm running a validation on form data, such that when somebody hits the submit button it checks the form's contents first. A number of fields (could be zero, could be more than one, depending on the page) have things like unique codes which require checking with the server first. I'm running an asynchronous request to the server, which s...

Asp.net and Jquery Tree

I need a tree that I can add nodes to, and save to the database once all the desired nodes have been added. I have looked into TreeView server side control, but I wanted to check out the Jquery tree as well. I realize that I will have to use JSON web services to write the data to the database (or retrieve it). I am new to Jquery. Can so...

JQuery on hover out get the element the mouse has moved into

I have a navigation system that has a single level drop down on some of the elements. I have got it working just the way I want, except that it's too easy to just fall out the bottom of the nav when mousing along it (it's a second full width line drop down with inline items). What I need is a way to stop the nav from dissapearing when ...