jquery

jquery - why do i need live() in this situation?

I have a somewhat odd situation. I understand the premise of the live() and bind() functions, yet in a situation where i believe i dont need them, i seemingly do. I will explain. I made an autosuggest in jquery. I included autosuggest.js at the top of my page. I then have an input field. The basis of the JS works around: $(".autosugg...

jQuery - unique control over a class using onChange

I'm using jQuery colorpicker on an app. When a color is selected and being selected, the color is displayed in a span class ".swatch". However, when there are two color select options on a single page, the span.swatch will both display the same color as the color is being selected. (see screenshot). Screenshot here: http://cl.ly/2MUU ...

Why does jQuery 1.4.2 compressed have a syntax error?

I always have noticed this, including in versions before as well. About half way through jQuery's compressed version you'll see some regex: [^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ The error appears to be at ['"] I'm sure it's not really a syntax error, but all my code editors recognize it as one, which makes development a pain ...

jQuery to get next match in the DOM after a particular element

I hate to admit it but I'm stuck trying to figure out how to do this. e.g. pretending you have the following structure: <div> ... <div> <ul> <li> <a href="..."><img class="foo"/></a><!-- "previous" --> </li> <li> <a href="..."><img class="bar"/></a> </li> <li> <a href="...">...

Can the out focus stop the call?

Ok so I have an autocomplete field heere that is making an ajax request every keystroke...But the .focusout() should kill the autocomplete because intuitively if the user leaves the field and moves on the next field it should not give you any suggestions bacause you already left the field. Any ideas on how to do this. Here is my code. I ...

facebook style navbar

Here is the navbar in my rails app. The problem is I am not sure if this wil work cross browser because I am adjusting the padding of the anchor tags to get the required height. THe other issue is the search form is inside this navbar and it's not vertically centered on inside it. I basically want a facebook style navbar that has a few...

Kohana 2 jQtouch Jquery

Trying to load some data from mysql into the next screen using jQtouch. What is the correct way of doing this. Right now I just have a jquery click event on the tag for the next page which really is just a div on the same page. The jquery looks like this. $.post("/mobile/getCities", {}, function(data){ loadURL($(this).attr('href'), "#...

jQuery - parent() not working within callback function

I was testing with parent() and closest(), none work within function. TD stays the same, no change using this method: $.get('form.php', function(data){ alert(data); $(this).closest('td').html('Done!'); }); TD gets updated, this method works: $.get('form.php', function(data){ alert(data); }); $(this).closest('td').h...

Validate ValidationGroup

Hello. I have a button on which I wish to validate a specific ValidationGroup in ASP.NET. This button is not a server control, but a standard a tag with an onclick event on. I have multiple validation groups on this page, so by calling Page_ClientValidate() is not enough, as the other validators will kick in as well. If your answer r...

jquery: unbind a loaded function

Hi, I have a function which will resize the image background when the page is loaded, $(document).ready(function(){ loadBackground(); }); and I want to 'unload' or 'remove' this loaded function when I click on a button so that I can load this function anew instead of loading it on top of the page, $('.get-image').click(function(){ ...

Can you help me understand this documentation

I have this AjaxQueue that i am trying to implement but I am having problems and even looked at the documentation and I am still unclear on how to implement it. I read it twice and still having troubles Here is my code: I want to wrap this in the Queue manager $('#request_artist').autocomplete({ serviceUrl: '<%= ajax_path("artistNam...

Replacing selected HTML text in jQuery

I have this code for replacing selected text: (it putts "1" and "2" before and after selected text): var content=$("#text").html(); if (window.getSelection) { // not IE case var selObj = window.getSelection(); var selRange = selObj.getRangeAt(0); content2 = content.substring(0,selRange.startOffset) + "1" + content.substring(selRan...

problem selecting jqGrid cell on rowSelect and sending them to server

When I am using rowSelect and sending the values of column 1 and 2 its not sending the value selected for second rowSelect ...instead only sending all the value of column 1 but not column 2 . ... my approach: jQuery("#viewt").click( function(){ var grid = jQuery("#inventoryInq"); var ids =grid.jqGrid('getGridParam','selarrrow...

Cross browser HTML5 iFrame

Right now I have an iFrame object with the seamless attribute which looks perfect, <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.google.com%2F&amp;amp;layout=standard&amp;amp;show_faces=false&amp;amp;width=400&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;height=35" seamless></iframe> with a coupl...

Constructively manipulating any value/object within a JSON tree of unknown depth

Hi, I have a JSON tree that contains nodes and children - the format is: jsonObject = { id:nodeid_1, children: [ { id:nodeid_2, children:[] }, { id:nodeid_3, children:[ { id:nodeid_4, children:[] }, { id:nodeid_5, children:[] } } } I don't know the depth of this tre...

Is using jQuery with Pixastic possible?

Hey! I have a set of link images (HTML): <a href="#"><img src="test.jpg /></a> <a href="#"><img src="test2.jpg /></a> <a href="#"><img src="test3.jpg /></a> They are partially transparent (CSS): #a img { border: 0; opacity: .2; } They're getting less transparent on hover (jQuery): $('a img').hover( function() { ...

How to select a button id when the button in clicked injavascript/jquery

Hello Everyone, I am new to javascript/jquery . I have a small question. I have some thing like the following in the java script file. <button id="button1" onclick=click() /> <button id="button2" onclick=click() /> <button id="button3" onclick=click() /> so the click function looks like the follwoing click(id){ /do some thing } s...

JQuery: Check if jquery plugin is already called

Hi all. I have build a jQuery plugin who needs to be 'closed' before it can be called again, so I need to check if the jQuery plugin is called (active). I know I could save a value with jQuery.data() and simply remove/reset it when the plugin closes but is there another or smarter way? ...

jQuery UI widgets

What jQuery UI widgets are there, except from the official ones? I know Accordion Autocomplete Button Datepicker Dialog Progressbar Slider Tabs ...

Text with slider & fade transition

Hi. I'm trying to get the text to slideUp on the first slide like it does on the rest of the slides. I've acheived this on the bottom slider, but not the top slider which uses the fade transition. Can anyone help me out? Here are the codes: if( this.settings.direction == 'opacity') { var text = '.lof-main-item-desc'; this....