jquery

please help onjquery hover

Hi, I have two divs. Say div1 and div2. By default div2 is invisible. When the user hovers over div1, I need to display div2. Now if the div2 is hovered then i need to keep displaying this div2 (even if div1 is no longer hovered), otherwise reset the div2's visibility to hidden. How do I keep div2 visible while hovered? ...

Javascript regular expression needed

Here is the format of the css I'm trying to edit using jquery. /*8d*/ .class{color:#444444;} /*5d*/ .class{background-color:#444444;} /*3f*/ .class{color:#444444;} /*9d*/ .class{color:#444444;} I want to replace several entire lines within using Regular Expressions. For example, How do I select line 5d the replace with "/*5d*/ .new{bo...

jQuery Validation plugin - how to change css on error

I am following the demo over here http://jquery.bassistance.de/validate/demo/marketo/ On submitting the form, if the field is empty, how are the input boxes and other fields getting that red border around them? What is it I have to add in my plugin decleration to get that? Update $("#profile_form").validate({ rules: { ...

jquery and jqueryUI conflicting

Is jquery 1.3.2 conflicting with jqueryui 1.8.4? I get the error "Too much recursion" (using the code below). When I combine jquery 1.3.2 with jqueryui 1.7.2 I don't get this error, but it breaks my code... Is there somewhere a reference table which jquery version works with which jqueryui code? <html> <head> <title>This is the title<...

How to load data using jquery and json?

Hi i want to load data from mysql database to php page using jquery and json. When user choose the name from select box, it load the person data into the text field. this is my html code (select) <select name='name' id='name'> <option value='1'>John</option> <option value='2'>Marco</option> <option value='3'>Charles</option> </...

How do I block the UI using JQuery UI?

I've been using this plugin to block the UI: http://jquery.malsup.com/block/ The plugin works excellently, it's just that I'd be enormously surprised if jQuery UI didn't do such a thing already, given that it must do effectively the same thing for it's Dialog feature. How does one block the UI using JQuery UI? ...

dream css image slider

Hi, Does anyone ever use this slider: http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html. I need someone's advice on how to remove the navigation and only show while on hover.. thanks ...

Get each Attribute of element in loop function

I have a HTML DIV element: <div class="obj" height="this is attr 1" rel="this is att2" width="this is att3"></div> I've a new Variable: attArray: var attArray = new Array(); I want to get step by step each att in div.obj into attArray. How do I do it? attArray[0] = "this is attr1" attArray[1] = "this is attr2" attArray[2] = "this ...

using jquery contains inside a function?

Hi all, I'm trying to use the jquery :contains (or .contains()) selector inside a function, however I can't seem to get it to work. Basically I'm passing a string to a function and I want to check the variable if it contains X, do something else do something else. If that makes sense. Here's my code. function checkMe(myVar) { if ($...

How to call a JavaScript function multiple times in a loop on page reload with ASP.NET

Hi, I'm using the local database functionality in Chrome and Safari and what I do when I want to save this to a remote database is to create a hidden textfield and then using JSON to stringify each row. In the code behind I then parse each JSON object and insert it into the list. What I want to do now is to delete these rows from the loc...

create dynamic array with jquery.

Hi guys. I need some help regarding jquery arrays. var queryArr; $(markersArray).each(function(index) { var _locationId = index; var _locName = markersArray[index].name; var _markerLat = markersArray[index].marker.getLatLng().lat(); var _markerLng = markersArray[index].marker.getLatLng().lng(); //I DO NOT ...

jQuery No Conflict Mode for extra functions

I'm sure this is a simple question, just can't seem to get it to work right. I was having some conflicts with jQuery, so I used the aliasing feature mentioned in the official documentation. jQuery(document).ready(function($){ $('.loadmore').addClass('hidden'); // works fine! loadmore(); }); function loadmore(){ $('.loadmore')....

too much recursion error in jquery

this code: $(document).ready(function() { $('body').click(function(evt) { if(evt.target.nodeName === 'A' && $(evt.target).hasClass('cross-link')) { $('a[href=#2]').trigger('click'); } });}); given me and error of "too much recursion" one might think that I should just attach a handler to the crosslink e...

How can I get rid of $ prefixes in my variable names with jQuery?

I started off naming my jQuery objects like $this. Then, I decided I didn't want to do it anymore. I just borrowed a large chunk of code from an old project. It is from the $ prefix days, and it is irking me! What regex can I use in my IDE to get rid of the $ prefixes on my variables? ...

jquery paginate for top and bottom

Here is my code, I don't know what is wrong. It is working but something is wrong in the cloned pagination doesn't following the #Pagination. When I clicked page 2 of #Pagination the #bottom_pagination_placeholder is not following. Please help <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"...

jquery: get selected checkboxes, put in array, delimit the array and output to dynamic html button

Hi, I want to have a web button that is generated dynamically depending on which checkboxes a user selects, without needing to reload the page. I guess jQuery is the way to do this but I am a complete noob with jQuery/JavaScript (trying to learn on the fly, which isn't easy). Ultimately, I think it s/b a 2-step process: (1) as the user...

trying to use $(selector).live() but seems to act as a double click

I have a page that loads content via ajax. When I click on a list item it shows a detail view of that item via ajax. In the details i have a lightbox that opens up if a link is clicked. I'm using Colorbox for that. What boggles me is that if I use $(selector).click() it won't work, nor the $(selector).bind() either. The only way a click...

jquery: this.not (':animated') && that.is (':visible') not following the rules, syntax problem? only few lines of code.

when i click on #button, it's stilling doing the 'do something', even though .wrapper is animating and .wrapper span is not visible. so it's not following the rules. what's wrong? $('#button').click(function(){ if( $('.wrapper').not(':animated') && $('.wrapper span').is(':visible') ) { //do something } }) ...

get user feedback before he leaves the site using Beforeunload event in Javascript/Jquery

Hi All, I would like to take users feedback before he/she leaves the site. I tried using the beforeunload event by have a issue, it pops up even if user is on my site, i would like it to pop up only if user is changing the Domain.. in the Browse address bar Thanks in Advance... ...

Uploadify fails to open file browser?

I have an implementation of uploadify running on top of a PHP application. It was working just fine on my test machine. However, I just uploaded it on to my production machine and it is failing. Uploadify correctly replaces the input field and presents the button. However, when the button is clicked nothing happens. It completely fa...