jquery

Rectangular co ordinates between two points in javascript

How to get the rectangular co ordinates between two points in javascript as an object? for example foo(10, 20, 30, 40) shold return (10, 40) and (30, 20) ...

how to use Jquery AJAX in Joomla Components?

i m developing site in Joomla, meanwhile i stuck in a problem,please help me in below problem here is my folder structure for component htdocs/Joomla/administrator/component/com_test/test.php,controller.php models/test.php controllers/test.php ...

Jquery Ajax image load works only after alert statement is inserted in $(window).one function

Hello, I have a peculiar problem. I am loading a JSON file that contains the src, width and height of a number of images. I am trying to load them into the smooth script jquery plugin and have the images scroll automatically. The "viewing area" div can fit three images side by side. When I first load the page, only the first image is ...

jQuery: Get clicked anchor from within unordered list

I have this markup (simplified): <ul class="targets"> <li><a href="javascript:void(0);" class="info">A</a></li> <li><a href="javascript:void(0);" class="info">B</a></li> <li><a href="javascript:void(0);" class="info">C</a></li> </ul> And this script (simplified): $('.targets').click(function(e) { alert(e.target); // a...

jquery callback function scope

when i use jquery to create an element(a div, for example) in a callback function, it doesn't allow me to manipulate the newly created element outside the callback function, how can I get around this? here is the example: $.get('menu.xml',function(data){ //create a new element with an ID called "#newElement" }) //I can't select the ...

Load external content using AJAX

Hi all! Is it possible to load an external site's content using jQuery's Ajax rather than an iFrame? This is what I am trying to achieve, but it would seem there might be some cross domain issues with this? $('#result').load('http://www.google.com'); In flash you can put a cross-domain policy file in the root of the site allow certa...

Setting image markup to a div is not loading the image

I am using Visual studio 2008 in Windows 7. After an ajax call, I am building an image markup dynamically and setting it to a div like this. var imageLocation="<%= Url.Action("Show", "Images", new { Id = Model.LoginUser.UserId })%>"; var markup = '<img class="profile-Image" src="' + imageLocation + '"/>'; $('.divImgdisplay').html(mark...

Fire post on Ajax.BeginForm with JQuery

Hey, I have this MVC form with 2 dropdownlist where selection on the first dropdown should update the second one through an AJAX call. Form looks as follows: <%using (Ajax.BeginForm("GetChildren", "Home", null, new AjaxOptions { UpdateTargetId = "result" }, new Dictionary<string, object> { { "id", "someForm" } })) { %> <%= Html.DropDo...

Show specific events every year

I want to show some events every year. E.g Like birhday, holiaday. which come every year on a specifc date Thanks ...

jQuery : targetting id problem

Hello, I cannot target an element in jQuery. First example which works : $(document).ready(function() { $('#Models').hide(); }); Second example which fails : $(document).ready(function() { $('#Make').bind('change',function() { $('#Models').hide(); }); }); In this case, the ...

JQuery - Microsoft JScript runtime error: Object expected

Below is the content of my .aspx page and the "jquery-ui-1.7.1.custom.min.js" is in the same location as the .aspx file. When I run the website with debugging, I get the below error. I know I am terribly missing something here. Any clue? Error :- Microsoft JScript runtime error: Object expected When I run without debugging, I get the...

jQuery date time picker

Hi everyone, Can anyone recommend me jQuery date picker whick is not jQuery UI. Thanks a lot. ...

Traversing unordered lists using Javascript/Jquery

Lets say I have an unordered nested list: <ul> <li>Item a1</li> <li>Item a2</li> <li>Item a3</li> <ul> <li>Item b1</li> <li>Item b2</li> <li>Item b3</li> <ul> <li>Item c1</li> <li>Item c2</li> <li>Item c3</li> ...

parent > child notation in jquery 1.3

Hi , I am using jquery 1.3 version <div id='mainPanel'> <div> <h3>Head #1 <a href="#"><input type="text" value="Type 1"/> </a></h3> <div> <div id="panel_1"> <div class="items"> <div><input type='text' value="0"/></div> <div><input type='text' value="1"/></div> <...

Reset custom form elements (jQuery)

I'd like to reset multiple textareas and input files by specifying them manually, how do I do with jQuery. I used this to clear forms until now: $('.clear').click(function () { $('form#input')[0].reset(); }); ...

Implicit Folding in TEXTAREA with Javascript

Hi there, I'd like to be able to create a type of folding in xhtml textareas using Javascript/jQuery. For example, given the following text: ABC [123] DEF I'd like to have [123] reduce to [] when the cursor is not over it - i.e. for a cursor |: ABC [] DEF| AB|C [] DEF ABC [|123] DEF ABC [12|3] DEF I want the content within the br...

the problem is that when i pass over a thumb too fast, the effect keeps blinking for a while...

('.menu-nav li').hover( function() { $j(this).addClass("active"); $j(this).find('.ulwrapper').stop(false, true).slideDown(); $j(this).find('.ulwrapper .ulwrapper').stop(false, true).slideUp(); }, function() { $j(this).removeClass("active"); $j(this).find('div').stop...

jQuery and User Controls

Question regarding jQuery and User Controls I have a series of User Controls and within each user control is a client side method that validates all required fields are validated. I would like to call theses user control's client side methods from the host page when submitting a form. Does anyone have code to do this or lead me to an e...

jQuery .post with array of dynamic variables

I've just tried and more or less given up on sending an array to a jQuery post function, which are then layed out as POST variables. I've read a lot of the similar questions on here, but none seems to quite get it. I tried all I could, closes was the following function sendValue(requestArray, requestAction){ $.post("requests.php", { ...

jquery count li elements inside ul -> length??

hey guys, if a "ul" has more than one "li"-element inside of it, somehting should happen, otherwise not! what am I doing wrong? if ( $('#menu ul').length > 1 ) { regards matt ...