jquery

Returned AJAX array not being copied to array

I have simple AJAX function that uses jQuery to return an array of 300 test objects from a database. I can see the data is returned, and I can use FireBug to step through the first loop and step into the constructor. This data is copied to an JS array. The code fragment looks like: //retrieve star locations to display on page $...

javascript proplems

lets say i have a list of links: <a id="home" href="#"> home link </a><br/> <a id="list1" href="#"> some text1 </a><br/> <a id="list2" href="#"> some text2 </a><br/> <a id="list3"> href="#"> some text3 </a><br/> <a id="list4" href="#"> some text4 </a><br/ <a id="list5" href="#"> some text5 </a><br/> <a id="list sails" href="#"> sails...

Remove a div with jQuery

Hello, I have this code currently in one of my websites, $("a.navlink").click(function (ev) { ev.preventDefault(); var id = $(this).attr("id") if($(this).hasClass("active")) { alert(id); $(id).remove("<div id="+ id +"/>"); } $(this).toggleClass("active"); var url = $(this).att...

jquery toggle blur on all textboxes?

Hi, I have a form which is validated through jquery, but I need the blur event to fire again once the submit button is checked, in case the user deletes anything. It shows an error but the "tick" is still displayed next to the text box, as this only changes on the blur event. How can I toggle the blur event to all text boxes to re-valid...

How do I make a message box like StackOverflow's?

I'm more or less aiming for the below, using the tutorial at http://roshanbh.com.np/2008/07/top-floating-message-box-using-jquery.html, however, I'd like to take it one step further. My bar will more or less work like SO's does when you have responses to a question. The idea is that mine will display something along the lines of "The ...

Codeigniter URI and jquery/javascript

Hello, I have a method in codeigniter that looks like this, public function category() { //$this->output->enable_profiler(TRUE); //echo "Hello function called by ajax"; $table = $this->uri->segment(3); $content_id = $this->uri->segment(4); $data['content'] = $this->site_model->get_content($table, $content_id); $this->load...

Can I style a disabled control using CSS or script?

I have a HTML div element on a page that is updated when a select element on the page changes. Sometimes the input tags (text boxes) need to be disabled based on the selection. Here is the problem: the project stakeholders like the functionality, they just think in the "disabled" state, the text box contents are too light and therefore...

Overriding target in jQuery event

Is it possible to override jQuerys target in a custom event? f.ex: var scope = function() { this.param = 'foo'; } var instance = new scope(); $(instance).bind('bar', function(e) { console.log(e.target); }); $(instance).trigger('bar'); This outputs the entire instance object, as it should. But if I want target to be someth...

Passing a value into Ajax enable WCF web service with jQuery.

Hi, I have created an Ajax enabled WCF web service that contains this simple method: [OperationContract] public string ParameterizedConnectionTest(string word) { return string.Format("You entered the word: {0}", word); } I can invoke the Web service with this client side JQuery code: <script type="text/javascri...

Using jQuery, how do I find all instances of a class that appear between another class

For example: <table> <tr class="highlight" id="click"> <td>Rusty</td> </tr> <tr class="indent"> <td>Dean</td> </tr> <tr class="indent"> <td>Hank</td> </tr> <tr class="highlight"> <td>Myra</td> </tr> </table> Say when I click on the hr with the id click how would I find all instances of class indent unti...

jquery ui tab with points

Any idea how i can get rid of the three dots that appear on this default jquery ui tab. I'm thinking its something to do with the css sheet, but i'm unsure which element to modify. Has anybody else seen this? The code (all regular enough) <div id="tabs"> <ul> <li><a href="#info">Info</a></li> <li><a href="#map">Map</a><...

jquey appendTo removes javascript script tags

var testdiv = '<div id="hello"><p>hiii</p> <script type="text/javascript">some javascript functions</script> </div>'; $(testdiv).appendTo(document.body); After running above code, div that is added is missing javascript, i.e everything inside < script type="text/javascript" > Is this known issue with appe...

JQuery clearing an input text field

I have a question regarding clearing an input text field when a different drop down on teh same page is clicked, the value in the input text field should be cleared. Here is my jQuery ftn. The alert message is shown everytime I select an option from drop down but the field does not get cleared. Any idea what the correct syntax should be:...

Galleriffic with lightBox

For the relaunch of my clients site (craft2eu.net) I need to integrate Galleriffic with a lightBox. I know there is GallerificPlus, but it is based on an old version of Galleriffic which brings some things I don't like. For example the invalid attributes, etc. How do I integrate the current version of Galleriffic (2.0 at the time of wr...

SimpleModal Confirm fails to submit form

I'm trying to use jQuery SimpleModal Confirm to show a Yes/No confirmation when a form is submitted. I had modified the demo here (last in list), as follows, to catch and block the form submission. However, this only seems to work with jQuery 1.2.6 a recent upgrade to 1.3.2 stops the form from being submitted if yes is clicked. I can'...

Selector regression after upgrade to jQuery 1.3.2

I've recently upgraded an application from jQuery 1.2 to 1.3.2 - and we've found a rather strange regression. For some html approximately like this (simplified a bit) <div id="steps"> <div class="step"> <span>step #1</span> <div class="removeStep"> X </div> </div> <div class="step"> <span>step #2</span> <div class...

Using Jquery for mouseover effect and queue

I've been looking around for the last couple hours on how to do this - can't find it anywhere. I have several buttons (divs). It consists of a div within a div. The parent div has the normal button background image, the child has a lighter glowy background image. On Mouseover, I want the child div to go to an opacity of 1.0, then fade o...

How to select all content between two of the same tags?

A similar question was asked before, but I'm looking for a jQuery solution using only the html below (ie. no classes or id attributes): <h2>Foo</h2> <p>asdf</p> <ul><li>asdf</li></ul> <p>asdf</p> <h2>Bar</h2> <p>asdf</p> <p>asdf</p> <h2>Baz</h2> <p>asdf</p> <p>asdf</p> I'd like to use some jQuery like: $('h2').afterButBeforeNext('h2'...

Exception when assigning value to IXMLHttpRequest object in IE7 and IE8

Hi, I didn't write the following code and I am not a Javascript expert. So please excuse me if it seems to you a trivial bug. However here is the code: jQuery.ajax({ type: barobj.method, url: handler, beforeSend: function (request) { request.vote_id = vid; ... }, complete: function (request, textSt...

How to embed JQuery into custom server control

I am writing a server control that is a search box with suggestions (when the user starts typing, matching words will appear for them to select). I am using jquery and C#. The control works fine when I include the jquery Lib on the page that I am testing on. However, it will not work when I attempt to embed the lib in the DLL. I have...