jquery

HTML/CSS/jQuery: How to set an "absolute text bottom" so that further text expands upwards?

This is kind of hard to explain, so I'll do my best: I want to have text content clamped to the bottom of a div - so that no matter how long the content is, it is always set to the bottom. So if I had: HEADER content 1 content 2 Content 2 would be lined up about 20px from the bottom of the parent div and if I had: HEADER content ...

How to get an int[] from a string of integers in javascript / jQuery?

I'd like to allow a user to be able to enter a list of IDs into a textarea and allow the IDs to be seperated by whitespace such as a new line as well as by commas. Then I'd like to convert that into an int[] or throw an error if the string is bad: contains letters, decimals, etc. But I'm having trouble working it out. Can anyone give ...

jQuery: JSON getting converted from an object to a string?

I'm using the Ajax Form jQuery plugin to get JSON from a server: /** * Helper function for the jQuery AJAX form plugin. */ function bindOnSuccess(form, callback) { form.ajaxForm({ dataType: 'json', success: function (response, status, xhr, $form) { callback(response); } }); } Usage: bindO...

My broken jQuery slide down menu using hover()

I have an html link that has uses hover() (well, the hoverIntent plugin...but same difference) to trigger a div to slidedown (I animate the CSS top attribute). This all works and looks perfectly, except that when the mouse moves off of the hyperlink and onto the div that contains the menu links, it immediately triggers the mouseleave e...

Coldfusion Ajax - Form Submission

I Need help with ColdFusion, I want to use the CF9 ajax library, I've got <cfajaximport tags="cfform"> in my header, and included a form using <cfdiv bind="url:domainchecker.cfm"> This however replaces the entire form with the "Loading" ajax wheel then shows the results. What I need, is for the form to submit, but the a separate result...

JQuery - Select all but last list (from multiple lists.)

Hi, I'm wondering if this is the most elegant and efficient way of doing this? I have multiple 'tag' lists, and through CSS, I want the tags to appear inline (display: inline) and be comma-separated. The challenge that I'm having is to append commas to all but the last list item in each ul.tagList: <ul class="outerList"> <li> ...

jQuery css to change element background but not element:hover background

basically I am using jquery cycle, and it has a wrapper for the numerical navigation to navigate the slideshows. <div id="slide_nav"> <a href="#">1</a> <a href="#">2</a> <a href="#">3</a> </div> the css is : #slide_nav a { background: #d5d5d5; } #slide_nav a.activeSlide,#slide_nav a:hover { background: #272727; } then i wa...

How can I access my PHP variables when calling ajax in jQuery?

I am attempting to create a simple comment reply to posts on a forum using the AJAX function in jQuery. The code is as follows: $.ajax({type:"POST", url:"./pages/submit.php", data:"comment="+ textarea +"& thread="+ currentId, cache:false, timeout:10000, success: function(msg) { // Request has been successfully su...

google.load not working when run in jquery's $(window).load(function(){}); ?

I'm using the Google AJAX Feed API to search for a RSS feed. It works when I just run the javascript in the head of my HTML document in EXAMPLE 1 below (I know I'm getting no result, but that's a problem for another day!), but I need to actually run it when everything's loaded. I'm using jquery, so I've got a $(window).load(function(){})...

Can anyone show me how to display this in normal xhtml?

$("body").trigger({ type:"logged", user:"foo", pass:"bar" }); ...

How to do numeric validation using JQuery?

How to do numeric validation using JQuery. I have to validate my price field using JQuery. any body knows please share your knowledge with me :( ...

Finding option within select options fails in Chrome and works in IE.. why?

I have a select list with multiple items which I want to be able to filter by the text entered into some text field. This is pretty simple if you just do a js contains while iterating over each option. There are however in some cases a lot of options, so I employed jQuery: var results = $("#myList options").find("option[text*=" + some...

how to get selector from jquery object ?

codes: var jqueryObj=$("#readme"); alert(jqueryObj.length); // result == 0 can i get "#readme" from jqueryObj ? like: alert(jqueryObj.selector); //i want get "#readme" BTW: i want to get selector,not element ID, and jqueryObj.length == 0. ...

Simulating :active with jQuery

For hover, I do this: $('.btn').hover(function (event) { $(this).toggleClass('hover'); }); Is there any similar workaround for :active? Need it for the damned IE6. Thanks! ...

Changing specific text using jQuery.

I have the following html code , and I want to search the Welcome and make it bold . <div class="welcome-msg">Welcome, First Name | </div> the Output should be like this using DOM manipulation. <div class="welcome-msg"><strong>Welcome</strong>, First Name | </div> thanks .. ...

jQuery cross domain iframe scripting

I am trying to access the DOM of an iframe that loads an external URL. Of course that I get a "Permission denied for" error due to cross domain security. How can I make this work? I saw something done with json (but I can not get a json string from my external source) and something done with HTML5 postmessage. you can see it live at : h...

jquery 1.4.2 ajax does not work with Internet Explorer 8

Greetings, I switch to jquery 1.4 but I got this error on ajax call: Message: This method cannot be called until the send method has been called. Edit: $('#AlertBar').load('/Desktop/Alerts'); ...

jQuery remove all HTML tags EXCEPT Anchors

Currently, I have this line: this.html(this.html().replace(/\x3C\x2F?[^\x3E]+\x3E/gi, '')); But, I would like something along the lines of an "if clause" to say, IF (this.tag = "<a") { do nothing } ELSE { remove tag } I don't suppose anyone has any ideas? [EDIT]: I think I may have to do a "FOR EACH" loop... I think.... [/EDI...

How I can do client side pagination for DIV elements generated from MYSQL query?

Hi I have this PHP code : $query = "SELECT * FROM news WHERE news_active = 1 AND news_type = 1 ORDER BY id DESC"; $q2 = "SELECT * FROM st_photos WHERE id = 4 LIMIT 1"; $r2 = mysql_query($q2); $row22 = mysql_fetch_array($r2); $news_set = mysql_query($query); $news_set2 = mysql_query($query); if (mysql_num_rows($news...

jQuery: Get all Windows

Hey, Im using the Prototype Javascript Library's Window class to create pop up windows in my webapplication. I want to submit a closeonesc command on the Windows and im doing this with jQuery. But atm i have to hardcore the close event on every singel win variable. So i was thinking that there have to be a way to check for all Windows ...