jquery

Add and remove class to make div appear and hide

I am using jQuery to show and hide a div by adding/removing a class to it. $('input').focus(function(){ $(this).parents('.row').addClass("linksdiv"); }).blur(function(){ $(this).parents('.row').removeClass("linksdiv"); }); It works quite well when focusing on inputs, but if I click a link in linksdiv it loses focus and the div...

Creating a drop down alert field on top of the page in javascript

Im building a voting system for my site, and i want to set it up to have a 300px drop down bar on top of page saying "Thank you for Voting" when the button is clicked. Anyone have a suggjestion on how to do this? ...

Trigger custom event in Rx JS

I'm trying to understand Reactive JS. In JQuery I can trigger custom events as $(document).bind('eventbus', function(e, d) { console.log(d);}); $(document).trigger('eventbus', 'test'); and pass around data (i.e. 'test'). It's not clear how to do this in RxJS. I could try to convert the jquery events as var observable = $(document)....

JQuery: Check value of input

How can I check if the number entered in the input-field is higher of even as th value in my 'min' field? <tr> <td>Steeeeaak</td> <td><input type="hidden" name="amount_5_min" value="10"/> <input type="text" name="amount_5" size="4" value="10"/></td> <td>-</td> ...

JQuery: Where to start learning?

Possible Duplicate: Where can I learn jQuery? Is it worth it? I'm working with Zend Framework and such PHP-things pretty ok, but at the moment my JQuery skill are below the acceptable level ... Where should I start learning JQuery? Are there some good sources to start with? ...

.hide()/.show() and Droppable

I have a problem where the element calls .show() when the draggable triggers drag, does not let me drop into the droppable. How can I fix this? $(document).ready(function() { $(".folder").droppable({ greedy: true, drop: function(event, ui) { $(".folder").hide(); }, tolerance: 'touch' }); ...

php & jquery upload image and preview display instantly

hi, im looking forward to create an upload module where user can browse, click open and it will instantly display a preview of that image without having to click a submit button so that user can continue to key in other information. i've done a simple but incomplete jquery below which basically capture the image name. but my question i...

Where to put the jQuery messages?

I have a form on my website (based on Drupal), and I've added a JS to it, now I have some messages like Hints on input keydown. I was wondering, where should I keep those messages (since I don't want them to be stored in each individual JS file that I'll be making from now on - but in one central place) ...

Show another div if earlier div height<300px

Hello, I am working on dynamic page where height of the page is concern. So, What I want is if height of <div id="a"> < 300px , Then only show new <div id="b"> How can I achieve this ? Thanks. Mandar ...

jquery callback called without waiting for response

hey, i am using the following function, $.ajax({ type: 'POST', url: "/User/SaveMyDetailsSettings", data: mySettings.MyDetailsForm.serialize(), success: function (data) { alert("callback"); alert(data); if (data == "Success") { window.location = "User/MySettings"; } else...

What are best practices and tips to use JavaScript without losing the site's Accessibility and SEO?

What are best practices and tips to use JavaScript without losing the site's Accessibility, usability and SEO, and site's content if JavaScript is disabled but still keeping site usability for JavaScript enabled users? In what scenarios we should avoid full dependency on JavaScript? ...

Check all checkboxes on page load with jQuery

On page load, using jQuery how can I select all check boxes in a specific div automatically? ...

How can I get jQuery to scroll down a div (to another div) on mouse over of a link?

Very hard to explain, I know.. especially since I'm new to the concept of programming altogether. But I want to, on mouse over of a link to the right, change the logo so it corresponds with the link. I want it to animate so it 'scrolls' past all the other logos to get to the right one, kinda like what some websites have been doing as of...

jQuery Image Rotator not functioning correctly in IE only

So I have put together a jquery image rotator just to fade in and out a set of images on a page. (note, may not be relevant but it is a drupal site). This works in all but the IE's. I have been trying to figure out why this is for so long and I cannot find it. Any help would be much appreciated. Here is the HTML: ...

translate rss-feed that was grabbed by cURL

Hello, my most trusted programmers and thank for all the help! I grab rss-feed by jquery-ajax using php curl. It's loading very nicely directly on the page. However, I would like to translate the text, that is now html, title within h2 and text within p, wrapped by a div-container. Google's api-script for translation doesn't seem to ru...

problem with jquery $.ajax and french characters when inserted in database

hello I get french characters who look like this é but are é for example. I am using jquery ajax and making a form validation with php then inserting in the database, i have try many things but nothing seems to get rid of the problem and i know it's because of jquery ajax because if i make a simple insert in database using only PHP eve...

Which Javascript framework to choose?

Possible Duplicate: Which Javascript framework (jQuery vs Dojo vs )? There are many Javascript Frameworks over the Web Development World. Among them most people choose JQuery but I am really complex which one to choose for the following reasons: Accessibility Input form widgets & validation Back button support (or) history...

What is the opposite of CLICK event?

I had a list <li> where the content inside li should get bold when it is clicked. For that i used the following code HTML <ul class="tabs"> <li><a href="#tab1" style="padding-left:5px;">All Sectors</a></li> <li><a href="#tab2">Information Technology</a></li> <li><a href="#tab3">Manufacturing</a></li> <...

jQuery AJAX document trigger?

Hi, My jQuery code: $('.Img').click(function() { alert('Test'); }); $().ready(function() { $.ajax( { type : 'POST', url : 'Post.php', success : function(Response) { $('#Response').html(Response); } } }); My HTML code: <div id="Response"></div> <img class="Img" src="blan...

jquery after() doesnt work properly when creating a url in internet explorer

so I have a fuction that exports some data async via asp.net and displays a URL on the page to download the exported file, it works perfectly in chrome. but in internet explorer, it displays the link, but the link is not click-able, it just renders as plain text! The data returned Export.aspx contains the Url to the exported file. (Reme...