jquery

PHP larger grids (or jquery)

I'm trying to jump into PHP and I want to move a current web app to it. The problem is this app had very large grids that rendered from database tables with a lot of fields (one of which was almost 100 fields). I'd like a flexible, good looking, and easy to use grid that can do filtering, grouping, etc.. Very important is that I can...

Does the jQuery .unbind() method only work on jQuery created events?

I am trying to unbind all event handlers for all elements that are inside a particular container. Like a DIV. But those events have been bound/registered not using jQuery. Some are bound the manual way with onclick="...." or using regular native JavaScript. But when I do something like this $('#TheDivContainer').find('div,td,tr,tbo...

Jquery full calendar with events from sql database

Hi, Can anyone give sample code in which there is interaction of jquery fullcalendar with the database ...

Loading xml with Jquery - why doesn't this work

I have regular javascript code and am trying to utilize JQuery just to load and parse an xml file. I have the following: function loadXml() { $(function() { $.ajax({ type: "GET", url: "my_file.xml", dataType: "xml", success: parseXml }); }); } func...

Get ID of clicked on element in function

I want to get the ID of an element I click on. I put the function in the onclick element, like this: <a id="myid" class="first active" onclick="markActiveLink();" href="#home">Home</a> And this is in the function: function markActiveLink() { alert($(this).attr("id")); } This doesn't work, as it says it isn't defined. Does it...

transition background-image/css change on hover?

I have a thumb nail inside another div, when the thumbnail is hovered I want the parent div to fade/transition to the background of the thumbnail, then fade back to the original image after hover. I have this so far which changes the parent background to that of the thumbnail and back but with no transition. $(document).ready(function(...

Jeditable doubling up on linebreaks every edit

I'm using var retval = value.replace(/<br[\s\/]?>/gi, '\n'); To strip the <br> tags from the textarea and nl2br('$_POST('newValueHere')') to insert into my database and to return back to jeditable to display the edits. The only problem I'm having is that each click on the editable field seems to make all the <br> tags be written twic...

repositioning a <p> from a jQueryUI dialog to centerstage for CSS Print

I'm using a jQueryUI Dialog command to popup a <p> and wish to print just the text of the <p> using the media="print" declarative html code:: <div class="jPajxDialog"> <p class="print"> Some Text </p> <div> I have tried: CSS code:: @charset "UTF-8"; body {visibility:hidden;} .print {visibility:visible;} .noprint {visibilit...

How to show ColorBox Dialog when URL Parameter is passed in jQuery

I'm looking to show a ColorBox Dialog, using the code $(document).ready(function() $(".colorbox_dialog").colorbox(); }); When the url parameter ?dialog=yes is passed. How can I do this in jQuery 1.3+? ...

Testing element visibility in jQuery

What is the best way to determine if an element is truly visible on the page? As in pixels are being changed both because the element is not hidden via CSS and is in the visible part of a scrollable area (the window or some overflowing block element)? I imagine I'll need to first check .is(':hidden') against the element and its parents...

jQuery modal dialog on ajaxStart event

I'm trying to use a jQuery UI modal dialog as a loading indicator via the ajaxStart, ajaxStop / ajaxComplete events. When the page fires, an Ajax handler loads some data, and the modal dialog shows just fine. However, it never hides or closes the dialog when the Ajax event is complete. It's a very small bit of code from the local server ...

How can I determine img width/height of dynamically loaded images in IE?

My markup is a simple div element with id 'load'. Using jQuery I then load a list of image elements into this div: $('#load').load('images.html', { }, function() { $(this).onImagesLoad({ selectorCallback: function() { ....do something.... } }); }); where images.html is a list like this: <img src='1.jpg' caption='im...

jQuery File Save As dialog for dynamic content

Hi, I've a servlet that is invoked via jquery ajax. The resulting XML is then transformed using XSL and displayed on screen. Now, the requirement is to either print or save this content to the local machine. The print portion is working fine but I'm stuck at the Save As part. How do I do this using jquery/javascript? I'm using IE8/XP. ...

jquery - loading inline javascript via AJAX

I have thrown together a quick prototype to try and establish a few very basic truths regarding what inline JavaScript can do when it is loaded with AJAX: index.html <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; </head> <body> <script type="tex...

Rails, JSON Object, jQuery, Auto-Complete

I'm using this jquery autocomplete plug-in with rails: http://docs.jquery.com/Plugins/Autocomplete I can't figure out how to format my results, both in my Rails controller and in my javascript file. I have something like this in my controller... @query = params[:q].downcase @json = User.all(:login => /^#{@query}/) respond_to do |forma...

How can I accept a hash mark in a URL via $_GET?

From what I have been able to understand, hash marks (#) aren't sent to the server, so it doesn't seem likely that I will be able to use raw PHP to parse data like in the URL below: index.php?name=Ben&address=101 S 10th St Suite #301 I'm looking to pre-populate form fields with this $_GET data. How would I do this with Javascript (or ...

jQuery Color **Swatch** Picker

Has anyone coded up a jQuery query color picker that lets you pick colors from a predetermined list of colors? Something like a product color picker on an Ecommerce site. Most of the searching I've done reveals a lot of general purpose, pick-any-color-in-the-rgb-spectrum, but few options for picking specific colors. ...

Javascript syntax error

Update: I tried a version of the script without the "beforeContentUpdate" part, and this script returns the following JSON {"COLUMNS":["TNAME","TBRIEF","GAMEID","TITLEID","RDATE","GNAME","PABBR","PNAME","RSCORE","RNAME"], "DATA":[["Dark Void","Ancient gods known as 'The Watchers,' once banished from our world by superhuman Adepts, have ...

JQuery/JavaScript div tag "containment" approach/algorithm?

Background: I've created an online circuit design application where div tags are containers that contain smaller div containers and so forth. Question: For any particular div tag I need to quickly identify if it contains other div tags (that may in turn contain other div tags). I've searched JQuery and I don't see any built-in routine ...

What are some javascript practices I should avoid for good SEO

So I would like to know some things I should avoid doing in javascript for good SEO rankings. In my next site I will use jquery and javascript extensively but do not want to sacrifice SEO. So what do you think I should avoid doing? ...