jquery

Is there any way to shrink an ascx to make it fit in a fixed div?

I have an ascx control and I need to to fit into a div on my page. I do not want to scroll it. Can I reduce it's size to make it fit correctly? The labels seem to be ok, but some of the table cells and textboxes could be shrunk and I believe it would fit ok. I was thinking of doing a jQuery select on the textboxes in the ascx and reducin...

jquery find by css attribute

Hi, I need to find an element based on a specific css attribute. the css is applied inline and I can not use a class. Is there anyway to achieve this in jquery? ...

Consistent grid headers with Flexigrid for jQuery

So I'm trying to use the flexigrid plugin. It looks like it's going to work great aside from the fact that it looks like you have to manually set the column widths. Otherwise, the column headers do not match up with the body columns. Is there any way of automatically matching these up, while still allowing the column widths to be defi...

Jquery: The $ dollarsign

I have something simple like this: $(selector).append("somestuff"); But since I'm going to reuse the selector I cache it with: var $selector = $(selector); So I end up with: $selector.append("somestuff"); My question is, should I be doing that, or should I be doing: var selector = $(selector); selector.append("somestuff"); Tr...

jQuery: Using the attr with custom attributes

Right now I'm doing various invalid things like: <span time="50" distance="60"></span> And then grabbing that info with: var time = $('span').attr('time'); var distance = $('span').attr('distance'); And then doing various things with the time and distance in jS/jQuery. To me, this feels wrong. It's insemantic, but I really can't c...

jQuery: How do I get the contents of a span, subtract by 1, and replace contents of span with new number?

Let's say I have a PHP loop that displays data that you can delete. I'm using AJAX, so when you delete a row, it processes a PHP script and the row disappears from the page. However, I have something that says "There are 5 items". I'd like that "5" to change when an item is deleted. I figured the easiest way would be to subtract by one ...

JQuery hover() possibilities!?

I'm using hover() as suggested in the documentation: $("#div").hover( function(){$(this).addClass('cie_hover');}, function(){$(this).removeClass('cie_hover') ;} ); Is there a way I can use more functions on other objects? And if so what would be the syntax to introduce functions in array? What I would like...

jQuery / JavaScript Bubbling and stopPropagation doesn't work

I'm making an edit button which pops up a modal box with a form to edit it. jQuery then sends this form to my server and I get a JSON response back. However, due to my bubbling issue, if I click on, for example, all of the edit buttons and then click on the last one and change a field, it does it across all of them. $('.edit').click(fun...

Can I count elements using jQuery?

I have a list in a ul that is in an ASP repeater. The list is set to overflow with a scrollbar and to only show 16 lis at a time. Is there a jQuery count function that I can use that would allow me to select every "16th" li and add a specific class to it? Selecting the last one won't work because the 16th div is not the last div since i...

emulating LiveHTTPheader in server side script or javascript?

Hi folks, I ran into this problem when scraping sites with heavy usage of javascript to obfuscate it's data. For example, "a href="javascript:void(0)" onClick="grabData(23)"> VIEW DETAILS This href attribute, reveals no information about the actual URL. You'd have to manually look and examine the grabData() javascript function to ge...

How can I get a value from MySQL using jQuery on Frontend

I am using jQuery UI on the front end. I want to get the values off MySQL database on my page on a mouseclick using AJAX. How do I retrieve data from MySQL using jQuery and update my div with the new HTML without a page refresh? Thanks ...

Linking jQuery Cycle Pager element

I am using jQuery Cycle plugin with pagers. I need to have navigation functionality, where I can provide a link to my client and he can browse that page which is a projects gallery. I need the cycle plugin to show a particular slide. Maybe variables can be supplied in the URL to go to a specific slide. I do not mind writing another jquer...

Using JQuery with .NET 1.1 web app

Hi, I have added jquery js file to a web page in .NET 1.1 web app. And added this script <script type="text/javascript"> $(function() { $("input").blur(function() { $(this).attr("background-color", "#000000"); }); }); </script> But when I tab off a textbox nothing happens. This should work right in 1.1?? M...

Is there a way to return a value (xml in my case) from a JQuery Ajax Call

I guess I am missing something quite fundamental and maybe someone can fill me in. I have used an ajax call from two places. So now I am trying to reuse that call by making the call return a value. It looks something like this: function getInfo() { $.ajax({ type: "GET", url: "../ajax.aspx?action=getInfo&id=4", dataT...

Maximum width/height canvas scrollbar interference?

I'm trying to get a 100% width, height canvas element to draw on, but I'm hitting something of a catch 22 because both Chrome and Firefox create scrollbars. The scrollbars appear to be there because the other respective scrollbar makes the content wider/taller. That is, the vertical scrollbar is there because the bottom of the canvas is ...

How to modify tabbed interface?

Hello, everyone) I've read a tutorial describing creating simple tabs: http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/ But I want to modify it, and cannot achieve the desired result, and that result can be seen at one template: http://themeforest.net/item/maven-portfolio-wordpress/49522?no_login=true (Just click on 'Live P...

jQuery Selector Question

i am actually doing a accordion/sliding menu. here, i want to slide up sibling li > ul that has been open (or displayed). can i simplify this further? $(this).parent("li").siblings("li:has(ul)").children("ul").slideUp("fast"); i also noticed that i cannot skip the children() part and do something like $(this).parent("li").siblings(...

$(document).ready and iframe content

Will $(document).ready in parent page wait for iframe content to be loaded completely? I have a parent page in which there is a an iFrame. After the iFrame is completely loaded I need to invoke a function in the iFrame from the parent page. ...

[jquery] Loading data from another url

Hello, I am new to javascript and jquery, i load the data from another site through php but i want to refresh it every minute without use of php because they data returned is in this format 1000, 10000 offcourse the numbers are different everytime. So how can i load the data every minute and split it, like in php i use explode(",", "1...

sorting xml in javascript/jquery

I was trying to sort some xml with jquery, but this code doesn't affect the actual xml or not returning a sorted result. Anything wrong with this code? $(xml).find('Tag').get().sort(function(a, b) { return $(a).find('Name').text() < $(b).find('Name').text() ? -1 : 1; }); ...