jquery

Can I test Ajax functions locally?

I have a simple call to replace the contents of a <div> with those of another HTML file using the .load() function: $('#content').show().load('01.html'); 01.html is in the same folder as this page. But the function isn't being executed. Is there a problem with my code? Or is it that the .load() function won't work until it's being s...

What is a good jQuery/Ajax lightbox plugin?

I am looking for a light weight, cross-browser compatible lightbox with features of displaying a pop-up window. I want to keep the popup window to be run in the lightbox and no matter what they do in the lightbox, the lightbox should never close until it is either clicked somewhere in the black area or by simply clicking an "X" in the u...

Repeat function every id named "" with jquery

Ok i have this function what it does is takes the value of id time, user, title, and bodytext. Function to insert into sql. function getblogpost() { var date = $('#time').text(); var user = $('#user').text(); var title = $('#title').text(); var textbody = $('#bodytext').text(); var postid = $('#pid').text(); db...

JQuery Mouseleave not working properly?

Hello, I have a slight problem, I'm making a dropdown using the help from someone else on this site. Using the following html and code HTML <div id="navbar"> <!-- Navigation --> <ul> <li id="current"><a href="dashboard.php" class="nav-dashboard">Dashboard</a></li> <li><a href="client.php" class="nav-client">Cli...

jQuery plugin and Mootools conflicts in JOOMLA 1.5.x

I m using Jquery in joomla 1.5.x ( which use mootools internally ) sometimes jquery works fine, but when i use some jQuery plugin then below errors occur ($(filter) || document).getElementsBySelector is not a function mootools.js( line 53) what is the solution of this error i m already using jQuery.noConflict() function before writing...

consuming asmx web service using ajax/jquery in ASP.NET?

HI I am trying to save data using web services-jquery and json, from some example on the web I wrote a similar code but a String instead of int: //----------------------------------------- <div id="dialogL" title="Create a new Layer"> <p>Enter Name:</p> <input id="txtValue1" type="text" size="40" /> <p>Enter Description:</...

Using jQuery to check for regular expressions

Hi all, I know there's the jQuery validation plugin. But I don't need something that extensive. All I want to do is have jQuery check a name text box: <input type="text" name="name" id="name" /> To make sure that it has at least 2 characters AND I want jQuery to check a phone text box (identical to the name text box, name="phone" ...

How to read the ul id?

I am having <ul class= "list" id = "List"> I want to read the ul id $("li:last-child input:button").live('click', function () { var val = $(this).closest('ul').val(); alert(val); }); How can I do that? In the above the alert is not displaying the id. ...

render :partial generates only one time on escape_javascript

render :partial generates only one time on escape_javascript eg <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("#addPerson").click(function(){ $("#user tr:last ").after("<%= escape_javascript(render :partial => 'user_item', :locals =>{:user_item => User.new}) %>"); ...

jqGrid columns width seem to go off after clicking on paginator

Using jqGrid version 3.6.5 Current pager extended options: { add: false, del: false, edit: false, search: false, refresh: false, position: "left" } Current grid options: $("#tblID").jqGrid({ url: '...', datatype: datatype, datastr: GridJsonData, mtype: 'GET', ...

jQuery .keyPress() - How to get value of input which triggered event?

Hi Guys, Trying to do some jQuery validation (without the plugin - please no answers like "Just use the validate-js plugin"). I'm wiring up a client-side event handler keypress for each "required field" on doc ready: $(document).ready(function() { $('#myform input.required').each(function() { $(this).keypress(onRequiredFieldKeyP...

How to get the value of a disabled radio button input field

I have a radio button something like this, <input type="radio" value="A" name="NodeLevel" /> When not disabled I could get the value of a pretty easily using, $("input[name=NodeLevel]").click(function () {}, but when the input type is disabled, how can I get the value of a radio button ? any work arounds ? ...

Displaying DOM element events and their handlers

Is there a tool - such as a browser extension, jQuery console script, bookmarklet or Firebug plugin - that displays all events that can be fired by a particular DOM element, and include any event handlers currently listening to those events? ...

Best Web-Framework with jQuery-Integration

I'm struggling to find out which PHP-Frameworks does the best job when it comes to integrate with jQuery as Frontend-Framework. Zend seems to work best with Dojo, CakePHP with Prototype, but my favorite one JQuery seems nowhere to be supported out of the box. For example CakePHP has a pagination helper, but it works only with Prototype ...

find which li was clicked

suppose i have 3 li. what i want to do is when i click any li then i want to know which li was clicked and add an event according to it. how do i do it with jquery, any help or suggestions please ...

In jQuery, how do you add markup above your selected DOM element?

If i have: <div id="test"></div> How do I select the test div and then add <div id="pre-test"> before the test div so it looks like this: <div id="pre-test"><div id="test"></div> Thanks guys ...

I have to disable button when page is loading ,,after full loading page i a have to enable using jquery or javascript how to do?

I have to disable button when page is loading ,,after full loading page i a have to enable using jquery or javascript how to do? ...

How to submit a form with AJAX/JSON ?

Currently my AJAX is working like this: index.php <a href='one.php' class='ajax'>One</a> <div id="workspace">workspace</div> one.php $arr = array ( "workspace" => "One" ); echo json_encode( $arr ); ajax.js jQuery(document).ready(function(){ jQuery('.ajax').live('click', function(event) { event.preventDefault(); ...

is it possible to move a div inside another div using jquery without re-rendering the html?

Okay, I might confuse some people who might be able to answer this question, I'll set this in the manner that I understand. Please bear with me. Let's say I have an array of divs in this manner: <div id="par1"><span>Text 1</span></div> <div id="par2"><span>Text 1</span></div> <div id="par3"><span>Text 1</span></div> <div id="par4"><spa...

jQuery access "previous" div

Here's my scenario. I have a DIV <div class="first"></div> if I click on an element inside this div, it generates another div, call it <div class="second"></div> now, can I click on an element inside second div to access the first div? does second DIV know that the first div exists? ...