jquery

Div overflow, ASP.NET GridView, JQuery and anchor

Hi ! I'm not a pro in web UI, so I will try to explain myself clearly. I have a tag with overflow: auto;. Inside that div, I have a GridView. There's a JQuery function that select the line clicked in the grid, only by changing the CSS class (to change the backgroud_color). I would like to know if I can put a kind of anchor so that the ...

jqGridPHP : jqGridRender Class > setColProperty > "editoptions"=>array("value"=> $datetime) > How to format the $datetime php variable ?

Hello, In a php file, i use the jqGridRender Class to build and manage a grid. To add a new item in my SQL table, i use (among others things) a php variable named $start. This variable is known, it belong to the PRIMARY KEY of this new item i want to add. Its type in the table is DATETIME and its value is "2010-06-16 06:00:00" How t...

Replace a DIV with another using effect and set cookie

Hi. I've got some complicated requirements and wondered if there's a way to accomplish this via jQuery: User comes to a web page for the first time today and we show DIV_1. After 30 seconds, we dissolve DIV_1 to DIV_2. We set a cookie on the user's machine that expires when s/he returns tomorrow. If the same user returns today, we only...

prefix + and - to divs using jquery.

i have jquery accordion script like this.. <script type='text/javascript'> $(document).ready(function() { $('div.Syb> div').hide(); $('div.Syb> h4').click(function() { $(this).next('div').slideToggle('fast') .siblings('div:visible').slideUp('fast'); }); }); </script> i need to show + and - symbol before the div ..to show...

[validate plugin] custom rule error

hi i have added a rule to my form but i can't understand why it does not work!! http://www.pipelabitta.it/form/ This is an example page: the rules is that the check box must be checked and there must be a valid date. From firefox console i can see it returns true or false as i need but the validation does not get triggered. Why is ...

Is it possible to use .data() as a search criteria?

I have a pretty complex chat application going on, and there are multiple chat panes, chat entries, chat submits, etc. going on in the same window. At first I was going to do something like.... <input type="text" class="chattext" id="chattext-42"> <input type="text" class="chattext" id="chattext-93"> <input type="button" class="chatsubm...

Jquery set defaults for all instances of a plugin

Given the following plugin how would you set defaults for all the instances? I would like it to work the same as $.datepicker.setDefaults(). (function ($) { $.fn.borderSwitcher = function (options) { defaults = { borderColor: 'Black', borderWidth: '1px', borderStyle: 'solid' }; return this.each(fun...

jQuery: using select onchange event to fill sibling text field?

<select onchange="$(self).siblings('input[type=text]').val( $(self).val() ); $(self).siblings('input[type=checkbox]').attr('checked','checked')"> that does not work before the select box, there are these inputs (examples): <input type="text" value="" id="product[14][value]" name="product[14][value]"> <input type="checkbox" value="1" ...

Getting html from jQuery object

I'm constructing html element and putting it in jQuery object. I'm having trouble getting HTML out of that jQuery object. I thought I can just use .html() but that returns an empty string. Ex: var myImage = $("<img src='blah.gif' />"); then I want actually get that html I tried $(myImage).html() <- no luck ...

stored context in a JQuery variable does not work

The following works fine: $(function() { EnableDisableButtons(); $('#TextBox1').keyup(function() { EnableDisableButtons(); }); }); function EnableDisableButtons() { var len = $('#TextBox1').val().length; if (len == 0) { $("#Button1").attr("disabled", "disabled"...

success handler for $.ajax function with a non-standard http status code

We've written a RESTful server API. For whatever reason, we made the decision that for DELETEs, we would like to return a 204 (No Content) status code, with an empty response. I'm trying to call this from jQuery, passing in a success handler and setting the verb to DELETE: jQuery.ajax({ type:'DELETE', url: url, success: ca...

scrolling h2 elements with scrollTo in jquery

I was wondering if anyone can help me with this scrolling problem using the scrollTo plugin for jquery.I want to be able to scroll one h2 element at a time with one click...in my script it scrolls across all h2 elements with one click..Help me please guys!! $(document).ready(function(){ $('#down').click(function(){ $("#container h...

jQuery SlideDown and Float issuse

I'm having an issue with jQuery slideDown when the contents of the object I'm sliding down is floated. What happens is that that the div slides down WAY past the height of the contents, and then 'snaps' to the proper height. I think (merely a theory) that the div is sliding down based on the height it would be if the contents inside w...

Change DIV order with jquery

Hello, I'm working on a client's HTML based site and need to randomly order a set of Divs on refresh of a page. I would normally handle this through PHP and a database call, but it's a static site. So, I'm wondering if anyone knows how to randomly display a set of div's using jquery? Here's an example: <div class="myItems"> <div...

jQuery - Load data by ajax

This is whole explore.php <head> <!-- Meta --> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /> <meta name="keywords" content="keywords, go, here, seperated, by, commas" /> <meta name="description" content="Short description of the site goes here." /> <!-- CSS --> <link rel="stylesheet" type="text/cs...

jQuery highlighting with ASP:UpdatePanel

I'm currently working with the AJAX:UpdatePanelAnimationExtender and I've implemented it in code behind which is currently working perfectly but I've ran into a problem with using the UpdatePanelAnimationExtender and an ASP:Repeater. I've been messing around with different ways of implementing it but nothing has worked correctly... I've...

jQuery : give preference to inner click

I have a big div with some links inside, I'd like to have the big div clickable AND links inside too, I did this : html : <div class="clickable"> some text... <a href="myurl1">Link 1</a> <a href="myurl2">Link 2</a> some text... </div> jquery : $('.clickable').click(function() { alert('Hello'); }); If I click on a link in...

[SOLVED]jquery: select first child node

lets say i have a tree of the following structure: <div>node level1 <div>node level2 <div>node level3...etc Is there a way in jQuery, that if div level1 is clicked, only divs of level2 respond? meaning: $('div').click(function(){ $('div').children(first div child).css('color','red'); }) thanks for any input! ::EDI...

prevent empty submissions in <textarea>

I have set up a <textarea> and functions that will pick up keystrokes. I have it set up where if the user presses Enter, the text typed in the text area will be submitted to a database. However, I want to prevent from submitting empty text, just pressing Enter and submitting. I also noticed that when Enter, a new line is created, so I c...

Get textbox value in new window using Jquery

I have an array of textboxes each having button on right side which when pressed the text should be displayed on new window using Jquery. For demo, you might have seen jquery lightbox plugin which shows the images in the new window. I want exactly same but instead of images i want to show the text value of the text box when its button is...