jquery

jQuery: Differences between $(this) and this

Hi, I'm trying to understand what differences are between $(this) and this in jQuery, and eventually find a way to get $(this) object from this (this what??): var last_btn; $("#element").click (function () { if (last_btn != null && last_btn == this) { // to unselect the current button last_btn.removeClass ("selected"...

jQuery - Disabling and Enabling Form Elements with Buttons

Hey all, thanks in advance for the help. This is my code: $(document).ready(function () { $("#showexistingcust").button().click(function () { $('#newcust :input').attr('disabled', 'disabled'); $('#newcust :select').attr('disabled', 'disabled'); $('#existingcust :input').removeAttr('disabled'); $('#exi...

2 javascripts plugin not working together

Hi, I tried to implement 2 plugins in a page and when i introduce the 2nd one... the 1st plugins stops working .. can you please help me in this.. he is the page i am trying to build.. http://www.ratingscorner.com/home21 and here are the 2 plugins i am trying to use. http://www.catswhocode.com/blog/how-to-integrate-a-slideshow-in-...

jQuery timer and animation problem

I have a problem with a jQuery Timer and animation, if I disable the animations ($.fx.off=0;) it works. Here is the code: var Count=10; $('body').everyTime(5000, 'countDown', function(){ if (Counter<Count){ $('.console').fadeOut('fast', function() { myArray.push(otherArray[Counter]); $('.console').html('<h3>'+myArra...

jQuery show content using horizontal slide/animate

Hi, I have a small menu that looks like this: Item1 | Item2 | Item3 The menu sits inside a div and floats to the right in the div. When I hover "Item1" I would like a "sub menu" to slide out to the left of the "Item1" item. Item 1.1 : Item 1.2 - Item1 | It...

Jquery href anchor value

I am having an anchor link in aspx page like: <a id="Anchor"class="myAnchor" href="Myproject/Mypage.aspx?myTag=asp">Go</a> I need to access the "myTag" value using jquery.How to do this? ...

jquery extract <meta property="og:url"

Hi is it possible to extract the meta data from a page loaded via ajax. I tried $("meta") as my selector but it doesn't work? Any help would be greatly appreciated. A this is my code $.ajax({ url: obj ,success: function(responseText){ var $response=$(responseText); console.log($response.find("meta").html()); } }); ...

JQuery with HTML imagemap

I can do something like this: $(document).ready(function(){ $(".schedule_link").colorbox({width:"95%", innerHeight:344, iframe:true}); }); to attach the colorbox to a link ... <a class='schedule_link' href="index.html">Schedules</a> ... but what is the syntax to attach it to an imagemap like this? <map name="mymap"> <area s...

How can I create a single/multiple selection dialog using JQueryUI ?

JQueryUI has a very nice Dialog, but I wonder how I could create a similar dialog with multiple values I can select from. It does not necessarily need to have a text area. Similar to how the right-click window looks or how the selection dialogs work on Android. ...

Form CSS: Styling a radio box's parent (label) based on checked / unchecked status

So i have a form. Most of the questions asked in the forms are using Radio inputs. i'm going with <label>Option1 <input type="radio"> </label> <label>Option2 <input type="radio"> </label> I'm styling the Labels using :hover, giving it a subtle background change to indicate which option you are highlighting. However, i want t...

Use jQuery to control video tag

So, I want to use a jQuery function to collect a URL from a link's REL, and pass it to a element. Collecting the REL and sending it to the is no problem... but what's required to trigger the element's load and play functions, from jQuery? Here's what I have so far: $(function(){ $('a.componentLink').click(function() { ...

jQuery preventing functions with stopPropagation

I have an input field in a form. On 'keyup' I display a suggestion list (like many search boxes). The results in the suggestionbox are clickable. Now I want to hide the suggestion list when I click anywhere but the list, but the single suggestions still have to be responsive. In another thread/question I read the answer to use stopPro...

How to call a function when clicking a dynamically generated link, using jQuery?

I am creating more than 1 <a href="#"></a> elements dynamically. The id attribute is also dynamically assigned. Like <a href="#" id='delete"+id+"'></a>. ID will becomes like delete01, delete02, ... I want to call a function when clicking any one of these element. I just know, $("#someId").click(this.someFunction()); calls the functio...

How to assign an error message when adding css class validation rule

I have added a css class validation rule for jquery validator as follows: jQuery.validator.addClassRules({ requiredDatepicker: { required: true, date: true } }); However, when doing this I get the default error messages. How can I assign custom error messages when using addClassRules()? ...

Is there a shorter way to write this script? (Targeting multiple elements to run the same function)

So I have this nice slider script that I want to use on this page: http://tuscaroratackle.com/rods for several instances on the page. (In other words each rod posting will have it's own slider, a total of about 11 sliders on the page) In order to run the script I have to include this function declaration: $(document).ready(function(){...

How do i filter data and populate combobox in javascript

Hi guys, I am thinking to work on two combos for: country and city. When user selects country in first combo, its cities should be populate in the city combobox. For it: 1.) Prepare 2 javascript variables: first one with countries id and name, second one with cities id, name and country_id For Countries: [ {"id":1, "title":"uk"}, {"i...

jQuery find/replace without changing original text

Is there a way in jQuery to find a string of text in jQuery and not replace it with something else but wrap that text with an element so when the script is finished it spits out the original text with the string of text wrapped. Example: Original Text "Hello world to all people" Search string "world to" Replace with <i></i> Fina...

jQuery .append() in MSIE

function loadSavedSort(start) { start = parseInt(start); if ( isNaN(start) ) start = 0; var listing = $("#viewsavedsort .listing"); listing.find('.item').remove(); var start = $('#savedSortStart').val(); $.getJSON('saveajax.php', { 'start': start }, function(data) { $("#viewsavedsor...

Optimize SVG game

I have created my first SVG game, using Raphaël.js. In Chrome the game feels fast, but in other browser like IE (understandable since it's using VML), Firefox, iPad safari and others, it feels slow at times. I'm looking for some tips on how I can optimize my code to squeeze out the absolute best performance. I've tried the best I can t...

Blink an div with jquery

How can i blink a div. I have a hover on the div element. How can i make with jQuery. That the div is blink up and blink down. And then on the 10 seconds. Thanks ...