jquery

jQuery AJAX request fails on PHP exception

Hi, I'm using the Kohana PHP Framework for an application. Now I'm running into a problem, when jQuery does an AJAX request to a certain file, it does work, but when this file throws an PHP exception, jQuery fails and doesn't show the output of the file. A little example, this is the piece of Javascript: $.post($('#' + e.currentTarget...

jQuery: how to capture keypress key using live()

I need to capture a tab keypress event on some dynamic inputs, but the normal syntax using the keypress event doesn't seem to be catching the key code. $('input').live('keypress', function (e) { if ( e.which == 9 ) alert( 'Tab pressed' ); }); This seems to be catching 0 as the keypress when I go through the debugger in fireb...

Image Thumbnails

It is possible to produce thumbnails from an image within a viewport slicing them? Possibly with Jquery! Like in this example but without using the canvs element. Galleria does something like that, but it's pretty slow on loading all the pictures in the cache and then resized them. I'm using a preloader but I don;t know how to resize the...

Problem with JQuery Calculation Plugin

I'm not able to get this to work at all. Getting not defined for all of the available functions. Everything is loaded correctly too. Here is the link to the example. Thanks, Mike ...

How to fadeOut a div after a document has loaded?

I'm trying to do something I thought was simple, but I'm not having any luck actually getting it to work. All I want to do is fade out a div after X number of seconds have passed since the document finished loading. In my Site.Master file I have the following: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <html ...

html link column in jqGrid

Is it possible have a html link in a column with jqGrid, I can't find any example in the documentation? ...

jQuery: How Do I simulate Drag and Drop in Code?

EDIT: Here's a link to show you my sample code: http://www.singingeels.com/jqtest/ I have a very simple page that references jquery-1.3.2.js, ui.core.js (latest version) and ui.draggable.js (also latest version). I have a div that I can drag around very easily (using the mouse of course): <div id="myDiv">hello</div> and then in Java...

Save div height in a cookie from jQuery resizable

Hi, I am using jQuery resizable from interface.eyecon.ro/docs/resizable for a menu on a page that I am working on. I need to set a cookie ( plugins.jquery.com/project/Cookie ) to store the height of the menu div so that the div doesn't resize to it's original css height on every page reload. I've been trying to adapt the code from http...

Multiple pages with codeignitor?

I am trying to find the best way to only have to load my view one time and re-use them on different pages. For the home page for example I have this code: function index() { /* Load Includes for all pages */ $header = $this->load->view('includes/header','',true); $scripts = $this->load->view('includes/scripts','',t...

Finding column index using jQuery when table contains column-spanning cells

Using jQuery, how can I find the column index of an arbitrary table cell in the example table below, such that cells spanning multiple columns have multiple indexes? HTML <table> <tbody> <tr> <td>One</td> <td>Two</td> <td id="example1">Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </t...

jQuery not getting element id from dynamically loaded file

I have this code, which gets an clicked div id: $(document).ready(function(){ $(".playitem").click(function(){ pos = this.id; alert(pos); }); }); And this is html code: <div class="playitem" id="item-123456"> code here... </div> This is how document dynamically loaded: $("#videoplaylist .left").load("extern1.htm"...

jquery: follow up html with function?

Hi, I know this doesn't work: $('#section').html($(data), function() { $('#section').fadeIn(); }); How would I go on writing it? It should be simply, but I've been away from jQuery for too long. Thanks! ...

hover doesn't work for image?

I tried following code: <script type="text/javascript"> $(document).ready(function(){ $("image").hover( function () { $(this).append($("<span> ***</span>")); }, function () { $(this).find("span:last").remove(); } ); }); <img alt="" src="../../Content/Disp.gif" /> It did not w...

What is the best looking web standards treeview for the web?

Does anyone know of a good TreeView for the web that is nice looking, efficient, and uses web standards? We use jQuery so it would be nice if it did too, but that isn't a requirment. ...

jquery reload div X amount of seconds problem

I know there are a million examples and tutrials on how to reload a DIV in jquery every X amount of seconds, here is the example code I am using right now <script> var auto_refresh = setInterval( function(){ $('#notificationcontainer').load('http://localhost/member/beta_new/notifications.inc.php'). fadeIn("slow"); }, 10000); <...

Jquery - Reference by ID - Supposed to return an array?

I just started using jQuery, and various sources suggest that the following should be used to reference an element by ID: $("#imgThumbnail") theoretically making something like this possible: $("#imgThumbnail").src; But my testing indicates that something like $("#imgThumbnail") returns an array, making the following necessary: $(...

How can i get the identifier of a draggable element by using stop event in JQuery ?

Hi, I have the following code <div id="container"> <div id="_01">1° item</div> <div id="_02">2° item</div> <div id="_03">3° item</div> <div id="_04">4° item</div> </div> So in my js code $("#container div").draggable({ stop:function(e, ui) { }}); What i have to put in stop event in order to get the identif...

Jquery image resizing bug in Internet Explorer 8 and 6.

Hi guys. I've designed a website using some Jquery techniques. My problem is that in some random cases, Internet Explorer 8 and 6 can make the images look smaller than they should be. I didn't check with Explorer 7, but it's probably there too... Note that resizing the page might be more liable to cause these problems, and in fact, the c...

Cant pass param in for $.ajax call

I have following ajax call: var empId = $(this).attr('name').replace(/disp/,''); $.ajax({ url: '<%= Url.Action( "AjaxDisp" ) %>', data: { id: empId, format: 'json' }, dataType: 'json', success: function(data,status) { // populate the popup and display it } }); empId is there(I...

How can I hide the jqgrid completely when no data returned?

I'm having a heck of a time trying to only display my jqGrid when records are returned from my webservice. I don't want it to be collapsed to where you only see the caption bar either, but if that's the best I can do, I suppose that I could put a meaningful message into the caption. Still, I'd much rather just hide the grid and show a ...