jquery

Show and Hide Dialog Footer Content with JQuery

Hello, I am using the JQuery Dialog UI component. This dialog is defined like the following: <div id="confirmDialog" title="Are you sure?"> Are you sure you want to delete this? </div> When I create this dialog, I am adding some content in the footer next to the buttons. I want this content to be hidden when the dialog is initially...

Can you make the font-size attribute scaleable based on the browser window?

Here's one I've never encountered before. Is it possible to make a font scale with the window size of the browser. For example: making the font size 100% of the available width. I'm open to Javascript, jQuery or CSS solutions. ...

Jquery, some objects in class animation

I'd like to do search animation like on twitter.com It means that when the user put the cursor over one element some other will be animated also. I try to do it in that way: $(".classinput").mouseover(function(){ $(this).animate({ opacity: 1, }); }).mouseleave(function(){ $(this).animate({ opacity: 0...

jquery why does $('tr').slideDown('slow'); break table layout?

Hi there, can anyone tell me why when using $('tr').slideDown('slow'); it causes the table row to forget its width, height ect. and if there is a way to fix it? ...

Loading Google Visualizations via AJAX in jQueryUI tabs

I'm trying to use jQueryUI tabs, loading the Tabs via AJAX. The problem I'm having is with Google Visualizations placed on those tabs -- they don't appear when retrieved via AJAX. I've setup a simple demonstration: http://htmlto.com/ui/index.php is the tab page. Tab 1 should load the page seen here: http://htmlto.com/ui/tab1.php But...

Get id of a checkbox? - jQuery

Hey, I am wondering how to get the id of a checkbox when it is checked. This is what my HTML would probably look like at first: <div class="check_filter"> <div id="filter"> <input type="checkbox" id="check1" /><label for="check1">Marketing</label> <input type="checkbox" id="check2" /><label for="check2">Automotive<...

[CSS] Header and paragraph hiding behind image

Hi, <div id="navigation"> <div id="home-block"> <a href="info.html"> <img src="images/ram.jpg" alt="ram-geheugen" class="a" /> <img src="images/ram_alt.jpg" alt="ram-geheugen" class="b" /> </a> <h1> <a href="info.html" class="fp">Info</a> </h1> <p> ...

Shall I use json_encode() when returning Array data to be accessed by JQuery AJAX?

Hi all, I was trying to use JQuery AJAX to grab some data retrieved from the database in cakePHP 1.26: function testing(){ $user = $this->user->findallbyuser_id("1"); return $user; } and here is the output from cakePHP built-in function Debug($user): Array ( [user_id] => 1 [name] => hello ) Here is the JQuery pa...

Application Theming

I'm designing an application that'd require different themes. By 'theme' I mean the colors and logo. Is using jQuery themeroller the only option or is there any easier solution to generate themes by providing colors and images? Thanks ...

jQuery ajax error handling with "script" dataType

I'm using a wrapper function around jQuery's AJAX function like this: $.getAjax = function(url, type, callback){ $.ajax({ url: url, cache: false, dataType: type, success: function(){ alert("success"); }, complete: function(XMLHttpRequest, textStatus){ alert("co...

Timed session variables in PHP? I am trying to lock people out for failed logins.

I am having trouble searching for what I am looking for. I figure it is best I ask here, so I can also find out what is the best practice or method for what I am attempting. I want to make a lockout script that prevents people from trying to login in too many times to prevent password cracking. I have one that makes a fade-in pop-up, wh...

Understanding the document-ready event

Hey, I was just writing another basic script for my JS & jQuery practice, and I was just pumping out the goold ol' document-ready event when I realized what this was actually comprise of, and I wanted to know if I was right or not: Here is the document ready for jQuery: $(document).ready(function(){}); Now, the dollar sign is shortha...

Why is returning true after calling $.post() not working?

I have a function which returns another function which returns a boolean value, on this i do validation which is causing unusual behavior. The code in the function is as follows: $.post( "classes/InsertCustomer.php", { iResult: theResult.valid }, function(data) { alert(data); }); return true; When this runs, the post ...

[JQUERY - JSONP] webkit based browser interpretate the json as a script

hi guys! im just tryin to get my zootool items via js to push them in my blog's footer...but with no success. here's the code im using (jquery framework) jQuery(document).ready(function($) { //first try var url = "http://zootool.com/api/users/items/?username=USER_NAME&amp;apikey=API_KEY&amp;jsonpcallback=?" $.getJSON(url, function(data...

Delete button does not show up in dynamically added row

Hello all, I'm using jQuery to dynamically add rows to my HTML table on a button click. For the newly added row, I want to have a '+' and 'X' button for adding/deleting the dynamically added rows. My HTML for the same is as follows: <td> <button type="button" class="addRow"> + </button> </td> And my jQuery code for the sa...

Get id of element and post in sql query?

Hey, I am trying to get the id of an element and then post that id in a sql query like this: jQuery gets id of checkbox: $(document).ready(function() { $(":checkbox").change(function(){ var id = $(this).attr('id'); $.post("index.php", { id: this.id, checked: this.checked }, function(data){ ...

jquery - recursively attach "submit" handlers to forms with ajax?

I'm using a modal plugin (colorbox) that has an option "onComplete". I can do the following to achieve part of the effect I'm going for (this is just the "onComplete" option): onComplete: function(){ $('.ajaxform').ajaxForm({ success: function(responseText){ $.colorbox({html:responseText}); } ...

How to get the context of a jQuery selector

I'm using .live(), and I'm trying to debug a weird error where jQuery Tools Overlay breaks all of the .live handlers on the page, except for ones with the context (second argument of jQuery select $(selector, context)) specified. So my specific question is how to find where this context is when it's not specified. ...

jQuery AJAX not Working to Update City By Province

As the title may suggest, I have been using jQuery AJAX to try and pull a list of Cities from a database when a Province is selected. I am using the following code: $('#province').change(function() { var province = $(this).val(); /*$.get("<?php echo site_url('cottage/cities'); ?>?province="+province, function(data) { ...

selecting a parcticular element in xml via jquery

can somebody help me select the url from this XML document where the ID = 2. via ajax. <images> <image id=0> <url>images/pic.jpg</url> </image> <image id=1> <url>images/pic.jpg</url> </image> <image id=2> <url>images/pic.jpg</url> </image> </images> I am guessing something like this... But currently it is displaying all the entries i...