jquery

How does the click() function in jquery work when working with multiple stacked divs?

How does the click() function in jquery work when working with multiple stacked divs? I have one main div and another div inside of the main div, when i click on the div inside, its also considered a click on the main div, but i dont want that, i want it to only consider a click on the inside div. <div id="main"><div id="inner"></div><...

jQuery ready function being called twice in a dialog

I am building a jQuery dialog with tabs in a PHP script. The script uses the 'include' directive inside of a loop, iterating over the tabs and including the other scripts. Each of the included files has the data for the tab and a <script> tag with a jQuery document.ready() function in it. Without the loop, it essentially does this: <...

jQuery Quicksand and Lightbox 2 problem.

I've installed Quicksand on my web and it was working like a charm. Soon my client wanted some fancy pop up for the images/gallery. I turned to Lightbox(old version) It worked but soon i realize it is picking up all the images instead of a set gallery. It works with Quicksand at this point. I've updated it to Lightbox 2 so it supports m...

Getting the 'co-ordinates' of a <TD> cell using jQuery

I'm building somewhat of a different website, below is my HTML markup and my question. Please don't be put off by this wall of text, I'm sure it's really not a difficult problem for someone who know's their stuff but it takes some explaining. <div id="0" class="cell" style="top: 0px; left: 0px;"> <table border="0" cellpadding="0" ce...

How to display images when a link is clicked using JQuery, PHP & MySQL?

Lets say a member is displaying 10 images by default but a link will display the rest of the users images by having them slide down when a user clicks a link. So my question basically is I want to be able to display all the users images buy having them slide down when a user clicks on a link <a>. How would I be able to tackle this prob...

Selecting a TD element from it's ID in jQuery

I have an array called currentTD that holds two integers, the first element in the array is an ID to a <TR> element, and the second element in the array is the ID of a <TD> element within that <TR>. I want to somehow select that <TD> and change its background colour. I'm just not sure how I can select that <TD> given the "co-ordinates" ...

With Jquery .click() can I also catch opening in a new tab or window?

To make this simple. I have some text that when you click on it. It then redirects you to home.html. As follows: $('#ElementID').click(function () { $('#ElementID').html('Redirecting...'); parent.location = 'http://' + host + '/home.html'; window.location = 'http://' + host + '/home.html'; }); The actual link ...

what's wrong with .match() javascript

jquery says: http://docs.jquery.com/JQuery_Core_Style_Guidelines#RegExp All RegExp operations should be done using .test() and .exec(). "string".match() is no longer used. Why is .match() not recommended? ...

syncing scrollbars using jQuery

Given the following code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script> $(document).ready(function(){ $('.scroll').bind('scroll', scrollBarSync); }); function scrollBarSync(event) { console.log($(event...

Javascript: Is there a way to send a cash drawer kick code?

I'm trying to make a cash drawer kick open. The command that needs to be sent to the drawer, by way of the receipt printer, is "chr(27).chr(112).chr(0).chr(100).chr(250)". Is there a way to send this command through javascript or other web based language. I want the cash drawer to only open only during certain receipt prints. ...

Jquery Modal Plugins

HI , I am using eric martin Jquery plugin now what i want to do is to load another modal on top of the modal which has been already . Is it possible to do so ? If so how can i achieve it ? please help me. ...

Internet Explorer won't load Flash that's requested with AJAX

I have a piece of jQuery that requests a file (using .load() method) with some HTML and an embedded Flash video player. IE7 doesn't seem to load the Flash video player, but it does load all the HTML and applies proper CSS to the elements. It works at least on FF3.6.6. I've tried both static embedding [1] and SWFObject [2]. I've also trie...

using jquery clicking on Div1 , Div2 should be open/close....

I want to add a + button to div 1 only if JavaScript enabled (otherwise it should not be there) and when user will click on + button then div 2 will be open/close like accordion. if div 2 is opened then + icon should be changed into - by default div 2 should be closed and if JavaScript would be disabled then it should open by default a...

problem with jquery ui`s autocomplete select callback (1.8)

With this code: function setupRow(event, ui) { var textbox, // how do i get to the textbox that triggered this? from there // on i can find these neighbours: hiddenField = textbox.next(), select = textbox.parents('tr').find('select'); textbox.val(ui.item.Name); hiddenField.val(ui.item.Id...

jQuery monitor entire page?

I have some code which adds a tooltip to all links. Now, the page keep changing with AJAX - how can I track these changes and add tooltips to links which are added to the document by AJAX? I thought this might work: $(document).live('change', function(){ //code... }); But I'm guessing there's a smarter/more efficient method to ...

My jQuery enabled form does not submit when I typed in html tags in the textarea?

I have simple form with a textarea and a button, and I submit the form with jQuery .post() function and in 'json' format. My form submits correctly until I wrote some html tags like bold etc. in the textarea, then the form dose NOT sumbit to server anymore. I don't know what is wrong with what I'm doing and how do I get html segments s...

document.getElementById("clock") is null

dear all.. i have a clock time inside my form..it run as a current time same with PC time.. i'm use this code: <script language="javascript"> var int=self.setInterval("clock()",1000); function clock() { var d=new Date(); ...

Please explain this jQuery

Perhaps my last question (now deleted) was misunderstood so I'm reposting it with more clarity this time: jQuery(UI): $("#tabs").tabs({ select: function(event, ui) { alert(ui.panel.id); $('input[name=myinput], textarea[name=myinput]').attr('disabled', true); $('input[name=myinput].' + ui.panel.id + ', texta...

JQgrid in asp.net

Hello all, I wanted to write a code for JQgrid in asp.net .I have tried the same in asp.net MVC,but i want it now in asp.net . In MVC we use Helper class,and return json data,so what to do in asp.net where helper class can not be used. Serialization can be done with data to get it in json.,but what about Htmlhelper. Suggest me and guide...

Looking for better hack....

Hello, I have page for which I want to load different template file for different browsers. Example : If browser is IE then load 1.tpl & If browser is other than IE load 2.tpl [ Here .tpl is template file having respective content & css ] I tried using conditional tags : <!--[if IE]> {include file="/templates/1.tpl"} <![end...