[jQuery] Re: Simple .html problem in 1.4

2010-01-19 Thread seasoup
What does the responseText look like? On Jan 18, 7:58 pm, Bruce MacKay br...@thomasbaine.com wrote: Hi folks, The following function works fine in jQ1.3, but not in jQ1.4 function getArchive(pID){      $.get(scripts/ajax_editor.asp?id=getArcepID=+pID+q= + new Date().getTime(),      

[jQuery] Shortest possible method of adding/removing class on mouseenter/leave without a plugin

2010-01-13 Thread seasoup
Is this it, or do you have something shorter? $('#nav li').each( function () { var $this = $(this); $this.bind('mouseenter mouseleave', function() { $this.toggleClass('hover') }); }); I thought hover would work, but it only does the mouseenter with one parameter, instead of

[jQuery] Re: Shortest possible method of adding/removing class on mouseenter/leave without a plugin

2010-01-13 Thread seasoup
:22 pm, seasoup seas...@gmail.com wrote: Is this it, or do you have something shorter? $('#nav li').each( function () {         var $this = $(this);         $this.bind('mouseenter mouseleave', function() { $this.toggleClass('hover') }); }); I thought hover would work, but it only

[jQuery] Re: Having issues with selecthing $(this).find('.classname') with webkit browsers (Chrome/Safari)

2009-12-08 Thread seasoup
lets see the html. On Dec 7, 12:34 pm, Leonard Teo teo.leon...@gmail.com wrote: Hi guys, I'm looking for a workaround... I'm having some issues with the following code:         //Navbar hover         $('.toplevel').hover(                 function(event){                        

[jQuery] Re: Very Strange !!! The same HTML code works well, but append() it not !!!

2009-12-07 Thread seasoup
javascript cant read strings over line breaks. $(#tb_video).append(' \ tr \ tdinput type=checkbox //td \ td' + d.name + '/td \

[jQuery] Re: jQuery $this question - NEED HELP PLEASE!

2009-12-05 Thread seasoup
Let's step through it THE SCRIPT:         this.vidPopUp = function(){ I take it that we're in an object at this point?                 $(.vidList li).click(function(){ Give me all of li descendents of DOM nodes with a class of vidList and add a click event on them                        

[jQuery] Re: Basic Bind Question

2009-12-04 Thread seasoup
Got two more uses for ya. Namespacing of events: // set two click events with different namespaces $('.button').bind('click.namespace1', function () { }).bind('click.namespace2', function () { }); //remove just one of them $('.button').unbind('click.namespace1', function () { }); and

[jQuery] Re: Problems injecting text into div classes

2009-11-25 Thread seasoup
$('.direction') returns a jQuery object that is similar to an array of nodes. $('.direction')[0] returns the first node in the jQuery object, without any jQuery features... just the basic DOM node. $ ('.direction').eq(0).html or $('.direction:eq(0)').html are what you are looking for. They

[jQuery] Creating custom attributes in html

2009-04-14 Thread seasoup
I was wondering what jquery developers opinion of adding custom attributes to html tags is, and what your basis is for these opinions? Why is it a good idea, or why is it a bad idea? What I mean is this: div href= myType=foocontent/div where 'myType' isn't in any specifications. I've run

[jQuery] Re: Order Items. Please help me. Thank You.

2009-02-24 Thread seasoup
Hi Miguel, not sure if it will solve your problem, but I find it is much faster to create a complete html string and then append it instead of doing lots of appends, which are slow. //this handles the li content var li =

[jQuery] Re: please support :target

2009-02-24 Thread seasoup
It is possible to write your own selectors. There are a bunch of tutorials around the web. here is one: http://www.coderanch.com/t/121354/HTML-JavaScript/Writing-custom-JQuery-Selectors and here is another: http://www.bennadel.com/blog/1457-How-To-Build-A-Custom-jQuery-Selector.htm Hope they

[jQuery] Re: can jQuery support drawing items on a CANVAS? (e.g. web-based UML tool)

2009-02-19 Thread seasoup
flash is the defacto method, but javascript can increasingly do anything flash can do. John Resig ported the processing language to javascript, though it isn't jQuery. http://ejohn.org/blog/processingjs/ On Feb 19, 5:11 pm, greghauptmann greg.hauptm...@gmail.com wrote: On Feb 20, 11:05 am,

[jQuery] Re: Accessing a JSON property from an unknown variable?

2009-02-14 Thread seasoup
It's not really an associative array. It is the property of an object, there are two notations for getting at an objects properties: foo.bar and foo['bar'] though you could even: eval('foo.' + fooProp); foo.bar is the preferred method, but if the property name has a space in it or needs to

[jQuery] Re: Order Items. Please help me. Thank You.

2009-02-11 Thread seasoup
You could remove the entire list everytime and regenerate it from javascript. Is Themes[0].Subject the actual name, or are you trying to refer to a javascript object in an array with the attribute 'Subject' which contains the name you are looking for? If it is the latter, this won't work.

[jQuery] Re: Question related to Javascript

2009-02-09 Thread seasoup
simpler as I'm inexperienced. Many thanks. On Feb 8, 8:11 pm, seasoup seas...@gmail.com wrote: Also, instead of saying var imgs0Slideshow = new Array(); imgs0Slideshow[0] = new Object(); It's easier to just say var imgs0Slideshow = []; imgs0Slideshow[0

[jQuery] Re: Question related to Javascript

2009-02-08 Thread seasoup
$(imgDisplay0_title).innerHTML = title; $(imgDisplay0_caption).innerHTML = caption; $(imgDisplay0_number).innerHTML = 1 of + imgs0Slideshow.length + Articles; should be $(imgDisplay0_title).html(title); $(imgDisplay0_caption).html(caption); $(imgDisplay0_number).html('1 of ' +

[jQuery] Re: Question related to Javascript

2009-02-08 Thread seasoup
Also, instead of saying var imgs0Slideshow = new Array(); imgs0Slideshow[0] = new Object(); It's easier to just say var imgs0Slideshow = []; imgs0Slideshow[0] = {}; and that achieves the exact same thing. On Feb 8, 1:10 am, seasoup seas...@gmail.com wrote: $(imgDisplay0_title).innerHTML

[jQuery] Re: Using selectors successfully...?

2009-02-08 Thread seasoup
In firefox, to see the changed html markup click on the page and do ctrl-A to select all and then right click and View Selection Source. This also work if you just highlight the element you want to see the source of. On Feb 7, 10:05 pm, brian bally.z...@gmail.com wrote: On Sun, Feb 8, 2009 at

[jQuery] Re: 'JQuery' tag is not working at all

2009-02-01 Thread seasoup
it should be jQuery little 'j', capital 'Q', little 'uery Don't you just hate those typos? On Feb 1, 12:53 am, Bluesapphire michealg...@gmail.com wrote: Hi!    This is continuation of my previous message. I also get following error in FireBug.

[jQuery] Re: Making Web Game- Need Hitpoint XP histogram/line graph

2009-01-31 Thread seasoup
flot http://code.google.com/p/flot/ On Jan 31, 7:06 am, TrixJo tri...@gmail.com wrote: Hi there, I have been using Yahoo UI for the past couple of years and finally jumped ship and have come over to JQuery mainly because of all of the amazing things I am seeing! I am making a simple web

[jQuery] Array Plugin

2009-01-28 Thread seasoup
Does anyone know of a plugin that duplicates Prototypes array methods. The closest I've found is the Rich Array Plugin. http://plugins.jquery.com/project/rich-array Any others?

[jQuery] Re: jquery not working at all after upgrade to 1.3.1

2009-01-23 Thread seasoup
Well, one issue might be that you are using onload in the body tag why not use the jQuery ready function that you are already using above? $(document).ready(function(){ $('#gid3').flexigrid(); DynarchMenu.setup('hmenu_01',{ context: true, electric: 500, tooltips: true });

[jQuery] Re: Looping JSON Data

2009-01-21 Thread seasoup
or... $.each(theList.list,function (a,b) { alert (b.id + ',' + b.name); }) On Jan 21, 7:30 pm, Ami aminad...@gmail.com wrote: I think that this what R U searching for: var theList={list:[ {id:15,name:Testing,description:test,owner:1,active:1,featured:0,machinename:testing},

[jQuery] .live help needed

2009-01-16 Thread seasoup
I'm playing around with the new .live functionality. it seems very cool. I have a page that gets refreshed with ajax with a .live getting set for a list of links every time, so I need to call .die but .dies doesn't seem to be working... $('a[name=prioritya]').die('click', currFxn);

[jQuery] Re: Passing vars to function

2009-01-12 Thread seasoup
untested, but the point is you can pass an object as the second parameter of the .bind() function. Doesn't work with the shortcuts as far as I know. Then, you can access those object in the event.data property of the event passed into the function. $(#artigos_listagem

[jQuery] Equivalent of the Prototype Create.Class()

2009-01-06 Thread seasoup
I'm converting some Prototype javascript and have almost completed it, but am running into an issue with the Class.Create() Prototype method. In prototype: var DatePicker = {}; DatePicker = Class.create(); DatePicker.prototype = { initialize:function(triggerElement, formElement) { ... allows

[jQuery] Re: Using jQuery.noConflict() with Prototype/Scriptaculous

2009-01-06 Thread seasoup
noConflict was designed specifically with prototype in mind :) The easiest way to do both jQuery and proto is to do: var $j = jQuery.noConflict(); and use $j instead of $ for jQuery. $j('#id'), for example. On Jan 6, 10:23 pm, Magnificent imightbewrongbutidontthin...@gmail.com wrote: Hi

[jQuery] Re: Equivalent of the Prototype Create.Class()

2009-01-06 Thread seasoup
Well, found it. FWIW... lowpro has a jquery plugin $.kreate() that ports Prototype Class.Create (). On Jan 6, 7:12 pm, seasoup seas...@gmail.com wrote: I'm converting some Prototype javascript and have almost completed it, but am running into an issue with the Class.Create() Prototype method

[jQuery] Re: Image rollover using jQuery

2008-11-30 Thread seasoup
plugin? How about the native .hover? $('img').hover(function() { $(this).attr('src',path + '' + $('this).attr('id') + '_over.gif'; }, function() { $(this).attr('src',path + '' + $('this).attr('id') + '_off.gif'; }); That will make every image on the page a rollover, changing the src of the

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread seasoup
I'd also like to chime in that double-right click is probably not very good UI design. No one expects to have to double right click something and people will probably be even more pissed that the context menu is gone. People like that thing. Why do you seek to disable it? I'm curious. On Nov

[jQuery] Re: avoid inserting twice

2008-11-29 Thread seasoup
or you can test inside the bind function: if ($('#header').next().('attr','id') != new) { $('#header').after('div id=newtester/div'); } On Nov 29, 7:34 am, Dave Methvin [EMAIL PROTECTED] wrote: Do you only want the button to work once? If that is the case, use .one () instead of .bind().

[jQuery] Re: Draggable() doesn't work with table rows?

2008-11-28 Thread seasoup
. On Nov 27, 4:34 pm, seasoup [EMAIL PROTECTED] wrote: I don't think you can drag table rows... it would remove them from the table... On Nov 27, 3:11 pm, René [EMAIL PROTECTED] wrote: I can drag and sort lists. I can sort tables. I can drag entire tables. But I can't drag

[jQuery] quote standards

2008-11-28 Thread seasoup
I've started using a single quote inside of all $() when quotes are needed because it makes creating DOM elements much simpler. $('a href=/path/a') or $('div id=anId/div and for consistency doing $('#anId'). Anyone else doing the same thing? Josh Powell

[jQuery] Re: button is null

2008-11-28 Thread seasoup
show us the code that generates the error. On Nov 28, 1:53 pm, sergiomedinag [EMAIL PROTECTED] wrote: Hi! I've just made a jQuery plugin that validates a form and shows a tooltip to see the strings accepted for the field. Everything works fine, except when I switch tabs in firefox+firebug I

[jQuery] Re: Error while printing the JSON content after evaluating!!!!

2008-11-28 Thread seasoup
Heya, happy to help. I have a few questions though. 1) Can/do you use firebug and console.log, it provides more information. 2) How come you are putting parenthesis around req.responseText? 3) Can you show us the req.responseText? Thanks, Josh Powell On Nov 28, 5:31 pm, aarti [EMAIL

[jQuery] Re: error option for jQuery.ajax

2008-11-27 Thread seasoup
Your getting an error in that code because you need a comma after the success:function(){}, Also, make sure there is no comma after the last method in the object or IE throws an error. Josh Powell On Nov 26, 11:51 pm, WebAppDeveloper [EMAIL PROTECTED] wrote: Hi, I have the following code

[jQuery] Re: Disable/Enable jQuery Added Events

2008-11-27 Thread seasoup
use .data to store a boolean variable on the DOM element, then in the click function check that variable to see if it is enabled or not. Josh Powell On Nov 27, 12:46 am, Neil Craig [EMAIL PROTECTED] wrote: Something I would like to do is to add several events handlers to an element and

[jQuery] Re: How to pass loop increment to Jquery

2008-11-27 Thread seasoup
jQuery automatically iterates through jQuery collections for you: $(function(){ $(.show).hover(function(){ $(.show_details).hide(slow); }, function(){ $(.show_details).show(slow); }) });

[jQuery] Re: Why keyCode into keyup event is disable

2008-11-27 Thread seasoup
Couple of things, 1) I highly suggest using json format to code javascript. Keeps things object oriented. 2) What are you attempting to do with the ).attr(id var myObj = { initform : function() { // To find every input field into myform and attach mykeyupfct $([EMAIL

[jQuery] Re: Validation

2008-11-27 Thread seasoup
put 'return result' inside of the success method. Everything outside of the ajax call is done sequentially, so its returning before the ajax call comes back. Actually, you may need to put the ajax call outside of validator.addmethod and call validator.addmethod inside of the success. On Nov

[jQuery] Re: Draggable() doesn't work with table rows?

2008-11-27 Thread seasoup
I don't think you can drag table rows... it would remove them from the table... On Nov 27, 3:11 pm, René [EMAIL PROTECTED] wrote: I can drag and sort lists. I can sort tables. I can drag entire tables. But I can't drag individual table rows. Anyone know how to do it? Here's some sandbox

[jQuery] Re: style selector (noob question)

2008-11-26 Thread seasoup
I don't think jQuery is designed to get an attribute from a class. The code you wrote div class=myclass / ... var color = $(.myclass).css(background-color); works by pulling the background color from the DOM object. A different hack that would work in one line:

[jQuery] Re: style selector (noob question)

2008-11-26 Thread seasoup
ok, found a plugin for you: http://flesler.webs.com/jQuery.Rule/ On Nov 26, 4:40 pm, Craig [EMAIL PROTECTED] wrote: Hi, does anyone know if it's possible to extract a style attribute from a style (and not an element)? For instance: style .myclass { background-color:white; } /style I

[jQuery] Re: trying to act on certain DIV's and not others

2008-11-26 Thread seasoup
I'm not sure exactly what it is you are trying to do, so can't answer with exact code but this code will make all divs have a click event that will hide all divs except the one you clicked on. $('div').click(function(){ $('div').not($(this)).hide(); }); Try thinking in terms of all of the

[jQuery] Re: Change text on toggle effect

2008-11-26 Thread seasoup
I think something like this is what you are looking for. It adds a click function to the elements with view and hide classes, which shows/ hides the text, uses end to get back the initial object, next to get the next one and show/hide it and finally hides itself. It should work, but I didn't