[jQuery] Re: Moving from .get(xml file) to using .ajax

2009-03-03 Thread ryan.joyce...@googlemail.com

if the browser is caching the query, would appending a parameter
containing a random number or some such to the end of the request stop
that?


[jQuery] Re: jquery plugin not loading

2009-02-16 Thread ryan.joyce...@googlemail.com

quick and dirty method to see if the .JS file was being pulled in at
all would be to stick an alert() in the plugin.js

if that works i'd assume there is something wrong with the way the
function is being called.


[jQuery] Re: Add Checkboxes in a table.

2009-01-22 Thread ryan.joyce...@googlemail.com

maybe try .append-ing stuff to the table?

$('table#my_table').append( stuff to append goes here )

On Jan 22, 3:42 pm, Andy adharb...@gmail.com wrote:
 I need to be able to dynamically add a new rows to a table and add
 elements such as check boxes, plain text and hyperlinks.  I cannot
 find any examples of this.  Would anyone have any samples or a good
 url?

 Thanks!


[jQuery] Re: Solution To Many Of Your CSS Nightmares!

2009-01-20 Thread ryan.joyce...@googlemail.com

 --rendering problems of a widget, in my experience, could involve
 many, indeed EVERY attribute of every element in the widget.

you declare your default stylesheet, then you declare your widget's
sheet. if the widget is inheriting incorrectly from a parent element
you've got a couple of ways around it. making every single line of the
widget's CSS !important is probably the longest (not in terms of a
find replace in n++, rather in terms of physical size). a nicer change
would just be to give the widget's parent element an appropriate
attribute val to reign in the -999px left-margin you originally gave
it.

 --this solution is for cases where changing your default css, which
 will of course affect your main site rendering, is undesirable or
 impossible. for me, doing a global replace of ; with  !important;
 takes about 1/2 a second. on the other hand, fine-tuning my main site
 css so that the widget and the site both look right could potentially
 take hours of trouble-shooting, trial-and-error, and juggling
 precedence, including specificity, order of declaration, id's and
 classes, and so on.

the inheritance path really isn't that complicated, and if your
stylesheet to that complex you don't fully understand it, inspecting
an element in firebug to see where it's getting it's style from takes
a couple of seconds. it's an ugly hack that has so many potential
problems it's barely worth considering for anything but the simplest
widget, and at that point why not just fix the widget's CSS properly.

 !important does not 'break' css-- it's part of the css language,
 intended to be used where appropriate.

the last part of that sentence is the important bit! ;)


[jQuery] Re: Solution To Many Of Your CSS Nightmares!

2009-01-19 Thread ryan.joyce...@googlemail.com

surely declaring the css you want to take priority after your site's
default stylesheet, this will solve the problem?

On Jan 18, 10:59 pm, johny why johny...@gmail.com wrote:
 ricardo, you're right that styles undeclared in the widget-css will
 cascade from the site-css into the widget, even if you use !important
 in the widget. that's an important point.


[jQuery] Re: Solution To Many Of Your CSS Nightmares!

2009-01-19 Thread ryan.joyce...@googlemail.com

but unless you've declared some of your default styles as !important,
the widget *will* take precedence if it's called after the default
CSS.

the only issues i can see are relative vs. explicit pixel sizes - for
ex. if you've declared pixel sizes for your fonts with some especially
broad selectors (globally stating that all paragraphs in divs have a
font size of 10px or whatever)  whilst the widget author has used
relative % sizes. Even in those cases it's be quicker, easier and
neater to just change your default CSS rather than replacing every
instance of ; with !important; in your imported stylesheet.

the long and the short of it it that it's a very inelegant solution to
a problem that isn't so much a 'problem' as 'the whole point of
cascading stylesheets'. it's like looking for a solution to grass
being green!

On Jan 19, 3:32 pm, johny why johny...@gmail.com wrote:
 i don't see it as a problem. With or without !important, the site-css
 will cascade into the widget for elements undeclared in the widget--
 the widget designer expects that. The important thing is for the
 widget's declared styles to take precedence, which !important achieves
 in most cases. (if i'm integrating the jQuery widget into a cms like,
 say, WordPress, i may or may not have control over exactly when the
 widget-css is declared.)


[jQuery] Re: $(area) not working in IE (sorry if this is a repost)

2009-01-16 Thread ryan.joyce...@googlemail.com

 I know... no Firebug in IE.  Poo.

maybe give firebug lite a go. it's a firebug library you can embed
into a page and view through any browser you like.

http://getfirebug.com/lite.html

it's always useful for trying to hack out random IE bugs.


On Jan 15, 5:00 am, James Van Dyke jame...@gmail.com wrote:
 Ok... that's a hard page to get away from with all those alert boxes.
 I know... no Firebug in IE.  Poo.

 I believe that class is not what IE calls that attribute.  For
 instance, element.class will return nothing.  element.className is the
 correct property.  Try that.

 Plus, you could shorten your code and make it a bit more readable:

 $(area).mouseover( function(){
     $(# . $(this).attr(class)).addClass('selected');}.mouseout( 
 function() {

     $(# . $(this).attr(class)).removeClass('selected');

 };

 Let me know how that works out.

 On Jan 14, 6:30 pm, Chrisw chris.p.wel...@gmail.com wrote:

  sorry if this is a repost but I didn't see it in the group and I
  didn't get a copy in my email. I am working with an image map and i am
  using the maphilight plugin and I want to add a border to an image
  below the image map  when a user hovers over an area (based on the
  iamges ID and the area's class)(see code below) I got it to work in FF
  but I cannot get it to work in IE. Any help?

  URL:http://oregonstate.edu/admissions/firstyear/recruitmap/map/

  Code:
                          $(area).hover(function(){
                                  var stateClass;
                                  stateClass = $(this).attr(class);
                                  var stateClassQuery;
                                  stateClassQuery = #+stateClass;
                                  alert(stateClassQuery);//for testing
                                  $(stateClassQuery).addClass('selected');
                          //mouse out
                                  },
                                  function(){
                                  var stateClass;
                                  stateClass = $(this).attr(class);
                                  var stateClassQuery;
                                  stateClassQuery = #+stateClass;
                                  $(stateClassQuery).removeClass('selected');
                                  }


[jQuery] Re: jQuery 1.3 Released

2009-01-15 Thread ryan.joyce...@googlemail.com

nice one, a 30% speed increase on selectors is impressive.