Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Inspector Chan
Jul 9, 2002

I like the third option: I keep the disc, and throw you both off.
I have a question and I'm not even sure it's possible. Let me explain first.

I'm working on a page and would love to use jQuery to add some cool tabs. The page is here. I already have the tabs built in html/css and the content is below that.

I've found some great tutorials on tabs but they all involve both the tabs and the content to be contained in the same div. This would be very difficult with my current code. Is there anyway to have tabs be in a separate container than the content?

Here's a skeleton of my code.

code:
		<ul class="tabs-nav">
			<li><a href="#description" class="description"><span>Description</span></a></li>
			<li><a href="#dates" class="dates"><span>Dates</span></a></li>
			<li><a href="#savings" class="savings"><span>Savings</span></a></li>
			<li><a href="#certification" class="certification"><span>Certification</span></a></li>
		</ul>
		
		<div id="cd_top"> </div>
		
		<div id="cd_content">
		
			<div id="descrpition" class="tabs-container">
			
			</div>
			
			<div id="dates" class="tabs-container">
			
			</div>
			
			<div id="savings" class="tabs-container">
			
			</div>
			
			<div id="certification" class="tabs-container">
			
			</div>

		</div>
If possible I would like to try to have it bookmarkable as well. Similar to this page.

Edit: I've come up with a solution. Visit http://knowledgeunited.com/ku2/description2.php to view it.

Inspector Chan fucked around with this message at 01:40 on Jan 23, 2009

Adbot
ADBOT LOVES YOU

Randomosity
Sep 21, 2003
My stalker WAS watching me...
I've got a weird problem.

I've got a webapp that uses jquery with the media plugin. Tested and works on IE6,7,8 Firefox 1,2 Safari, etc.

1 client is telling me that they get an error on the page, using IE7.
code:
IE Version -- 7.0.5730. 13IS
Error message --
Line: 166
Char: 2
Error: '$fn.media.defaults' is null or not an object
Code: 0
I've got no idea how to tackle this. It's javascript that runs fine on every other browser, but client's upgrade to IE7 seems to have broken it. Any ideas?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
'$fn.media.defaults' looks like it might have supposed to be '$.fn.media.defaults' (note the period after $)... maybe?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
What is everyone's favorite tooltip plugin? I can't seem to find one I like.

MononcQc
May 29, 2007

I'm running in a problem with IE6 and IE7:
code:
function longpoll(url){
    $.getJSON(url, {}, function(data){
        if ($.keys(data).length == 2)
            rpc(data['fn'],data['args']);
        longpoll(url);
    });
}
This enters an endless loop as soon as a response is received. for the first time. All it does is it keeps doing the callback all over again, with the same return values as the first one. This means I'm getting the same data variable each time and then IE crashes.

I've then tried
code:
$(document).ajaxStop(function(){ longpoll(url+id) });
longpoll(url+id);
In the 'document ready' function and got the exact same endless loop.

Is there any workaround for that? FF, Chrome and Safari all seem to deal with it fine, just not IE.

sonic bed head
Dec 18, 2003

this is naturual, baby!

MononcQc posted:

I'm running in a problem with IE6 and IE7:
code:
function longpoll(url){
    $.getJSON(url, {}, function(data){
        if ($.keys(data).length == 2)
            rpc(data['fn'],data['args']);
        longpoll(url);
    });
}
This enters an endless loop as soon as a response is received. for the first time. All it does is it keeps doing the callback all over again, with the same return values as the first one. This means I'm getting the same data variable each time and then IE crashes.

I've then tried
code:
$(document).ajaxStop(function(){ longpoll(url+id) });
longpoll(url+id);
In the 'document ready' function and got the exact same endless loop.

Is there any workaround for that? FF, Chrome and Safari all seem to deal with it fine, just not IE.

Do you have an example of the json string that is returned? My bet is that you have an extra comma problem that completely breaks IE but all of the other browsers gloss over.

MononcQc
May 29, 2007

sonic bed head posted:

Do you have an example of the json string that is returned? My bet is that you have an extra comma problem that completely breaks IE but all of the other browsers gloss over.

sure: {"fn":"notice", "args":"msg"}. I also tried {fn:"notice", args:"msg"} before, and ended with the same stack overflow in IE.

To add details, the function does run in IE. The problem is it runs again and again before an answer from the getJSON query can be obtained the second time, and the callback just loops over itself over and over again.

Here's the javascript code for the relevant functions:

code:
jQuery.extend({
	keys: function(obj){
		var a = [];
		jQuery.each(obj, function(k){ a.push(k) });
		return a;
    }
});

function rpc(fn, params){
	funcs = {
		"restart":function(Params){ restart_comet(Params); },
		"alert":function(Params){ alert(Params); },
		"append":function(content){ $('body').append(content); },
		"notice":function(msg){ notice(msg); }
	};
	return funcs[fn](params);
}
function eval_rpc(data){
	if ($.keys(data).length == 2)
		rpc(data['fn'],data['args']);
}
function longpoll(url){
	$.getJSON(url, eval_rpc);
}
jQuery(function($){
	id  = Math.random() * Math.pow(10,17);
	url = "http://mysandbox.localhost/longpoll/";
	$(document).ajaxStop(function(){ longpoll(url+id) });
	longpoll(url+id);
}(jQuery));

MononcQc fucked around with this message at 14:33 on Feb 4, 2009

ATLbeer
Sep 26, 2004
Über nerd
I've got a simple question I'm sure. I'm just haven't worked in javascript/jquery in a while and it's escaping me

code:
var podcast_id
$(document).ready(function(){
	podcast_id = this.id
	$(".like_b").click(function(){
		$.get('/ajax/like/'+podcast_id+'/', function(data){
		if (data == "yes"){
			alert(podcast_id) // this is undefined? i need that id again
		}
		else{				
		}
	})
})
})
I know Javascript has a global namespace but, podcast_id is still undefined inside the .get function? If this is a namespace issue how do I pass the podcast_id variable into the functions so I can use it deeper. I need to use it again to reference an HTML object

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Yes, podcast_id would be accessible from there. It's likely that this.id is what is undefined.

ATLbeer
Sep 26, 2004
Über nerd

supster posted:

Yes, podcast_id would be accessible from there. It's likely that this.id is what is undefined.

Woh.. Stupid bug, that assignment should be inside the .get function call...
Doh.

Works fine... Stare at a computer monitor full of code long enough and the lines blur together

The1ManMoshPit
Apr 17, 2005

Edit: SOLVED MYSELF leaving this up for interest's sake I guess


I've got a problem trying to do some DOM manipulation. I am posting a form to a hidden iframe and then I want to retrieve the contents from a div within that iframe and copy them into a div on the parent document. Everything works fine and dandy in Safari & Firefox, but in IE7 the div in the parent ends up empty. I've added alerts into the code and they all show up as [object OBJECT] in IE so nothing in there is null, but for whatever reason it just does not want to play nice and copy for me.

Here's the js for the onLoad function for the iframe:

code:
$('#image_upload_async_id').load(function()
{ 
    var iframe = $('#image_upload_async_id')[0];
    var doc = iframe.document || iframe.contentDocument || iframe.contentWindow && iframe.contentWindow.document || null;
    if (doc) 
    {
        alert($('#image_upload_output_id', doc));   //this is the id of the div in the iframe and it is not null
        alert($('#image_uploaded_id', doc));  //this is the id of an img within that div and it is not null either
        async_out_div.empty().append($('#image_upload_output_id', doc).html());  //this leaves the output div empty in IE only
    }
    else
    {
        //fail gracefully
        alert("error no iframe doc");
        async_out_div.html("<h2>Image uploaded successfully</h2>");
    }
});
Edit: I found this http://groups.google.com/group/jquery-en/msg/06aafb907a9b7c66 which says that you cannot copy DOM nodes between an iframe and its parent, so I changed the call to use .html() instead and I get the same results.

Edit for solution:

Apparently for whatever reason IE allows you to grab the content if you access it using window.frames, so this works:

code:
    $('#image_upload_async_id').load(function()
    {   
        var iframe = window.frames['image_upload_async_id'];
        if (iframe) 
        {
            async_out_div.empty().append(iframe.document.body.innerHTML);
        } 
        else
        { 
            //fail gracefully
            alert("error no iframe doc");
            async_out_div.html("<h2>Image uploaded successfully</h2>");
        } 
    });

The1ManMoshPit fucked around with this message at 22:48 on Feb 26, 2009

tastethehappy
Sep 11, 2008

What part of highly classified do you not understand?

supster posted:

What is everyone's favorite tooltip plugin? I can't seem to find one I like.
Ugh, I have yet to find a good tooltip plugin.

It's such a simple thing, but nothing seems to get it "right." And of course, I'm not helping matters any, because I can't even articulate what it is that they're getting "wrong."

So we ended up writing our own, and even it's suffering from the same "not right, but I can't quite put a finger on why" syndrome.

So if you do find a good one, make sure to post it here :)

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
What did you come up with? Post a demo and maybe I can point out improvements (if you have any intention of developing it further).

tastethehappy
Sep 11, 2008

What part of highly classified do you not understand?

supster posted:

What did you come up with? Post a demo and maybe I can point out improvements (if you have any intention of developing it further).
Unfortunately, it's an in-house project right now, and I can't post anything.

Functionally, it's fine, and works pretty much perfectly for what we need, but it just "feels" like there should be something more. I just can't articulate what it is.

RyanNotBrian
Nov 28, 2005

Always five, acting as one. Dedicated! Inseparable! Invincible!
Hi folks,

I've built the simplest test case to show a problem I'm having with JQuery 1.3.2. You can see it here:

xxxxx dead link removed xxxxx

Its just simple span thats starts off hidden, and then reveals with a slideDown. Clicking "Button 1" then "Button 2" a few times will show the problem.

I'm getting an issue where the image flashes up on screen for a split second just before the slide down. Sometimes its the entire image, other times its just the top 25%. Occasionally it slides without the flash. This happens in FF and IE7 on WinXP.

Has anyone come across this issue with JQuery? I downloaded an earlier version and it didn't seem to have the problem, however a bunch of other form handling stuff I'd already built was not supported, and anyway this is the current recommended build.

Any ideas?

RyanNotBrian fucked around with this message at 13:37 on Oct 28, 2009

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Seems to be a problem when sliding down an image wrapped in an inline element. Can you slide the image itself or wrap it in a block element instead of an inline? You should report the bug regardless.


I also want to just say that I love the 1.3 release. Tons of awesome changes that I always wished were in jQuery. I am especially happy with live events and $.closest().

If you haven't read about it, check it out here:
http://docs.jquery.com/Release:jQuery_1.3

keveh
Sep 14, 2004

If you have a problem.....
Hopefully somebody will be able to help me with this.

I have a page with multiple rows in it, each row has a button with a class of .edit_but and in my jquery functions I have:

code:
$(".edit_but").click( function(){
which will update that individual work. That works fine and everything updates fine.

I also have an add function on the same page, which saves a new row and adds that row to the bottom of the other rows. This new row also has a button with the class of .edit_but.

This is where my problem is, when that new row is appended to the end of the rows, the new edit button doesn't have the click function applied to it. When you click on the new edit button there are no errors thrown, so I'm not getting any feedback at all.

I was wondering if anybody knew of a way to apply that click function to a new button.

Cheers

RyanNotBrian
Nov 28, 2005

Always five, acting as one. Dedicated! Inseparable! Invincible!

keveh posted:

...

code:
$(".edit_but").click( function(){
...

I was wondering if anybody knew of a way to apply that click function to a new button.

Cheers

Is the code above in your document.ready() clause? In that case I think it will be only called once when your page loads. Can you call it again manually on the specific button that you have added?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH

keveh posted:

Hopefully somebody will be able to help me with this.

I have a page with multiple rows in it, each row has a button with a class of .edit_but and in my jquery functions I have:

code:
$(".edit_but").click( function(){
which will update that individual work. That works fine and everything updates fine.

I also have an add function on the same page, which saves a new row and adds that row to the bottom of the other rows. This new row also has a button with the class of .edit_but.

This is where my problem is, when that new row is appended to the end of the rows, the new edit button doesn't have the click function applied to it. When you click on the new edit button there are no errors thrown, so I'm not getting any feedback at all.

I was wondering if anybody knew of a way to apply that click function to a new button.

Cheers
Heh. Figures right after I post saying how awesome the new live events are in 1.3 someone brings up a case where live events can be used :). Look into live events here.

If for some reason you are not using 1.3 then you can simply pass true as a parameter to $.clone() when you are calling that in your add event handler. This will make it so that the event handlers are also cloned.

If you are not using 1.3 and you are not using $.clone() (e.g., you are injecting newly created elements into the DOM) then you will simply have to rebind your handler to the event. You can save your callback function as a variable so you're not duplicating code.


edit: some of this may not make sense, if you are still stuck I can clarify.

keveh
Sep 14, 2004

If you have a problem.....
The live function worked brilliantly.

Cheers for that!

keveh
Sep 14, 2004

If you have a problem.....
OK, I am having another problem that has had me stuck for over an hour.

I developed locally and all of my jquery works fine. I've just uploaded and I can't even get past the first step.

Here is an example of where it isn't working. I've got html which looks like this:

code:
<div id="label_holder">
	<div id="label_details">
		Content Here

		<input type="button" value="Save Labels" id="save_label"/>
                <div id="label_msg"/>
	</div>
                   		
	<div id="label_loading" style="display: none;">
		<img src="loading.gif"/>
	</div>
</div>
So what happens is when you click Save Labels, the detail div will be hidden, the loading div is show, the ajax does it's business, msg is updated with feedback then the loading div is hidden and details is show again.

I know, a long winded way of doing it, but I've got fades and slides etc in there.

This all works locally.

When I try to do it on the site I've uploaded it to it doesn't get past the first step of hiding the details div. It does attempt it though, as using firebug I can see that the details div is wrapped in the div that does the sliding effect like so:

code:
<div id="label_holder">
<div style="border: medium none ; margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; 
overflow: hidden; font-size: 100%; -moz-background-clip: -moz-initial; 
-moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; position: relative; width: 656px; 
height: 56px; float: none;" class="ui-effects-wrapper">

	<div id="label_details">
		Content Here

		<input type="button" value="Save Labels" id="save_label"/>
                <div id="label_msg"/>
	</div>
</div>                   		
	<div id="label_loading" style="display: none;">
		<img src="loading.gif"/>
	</div>
</div>
But it stops there. I have put an alert in my jquery to see where it stops but it's not getting to that section. If I put the alert after the initial click function it does alert out test.

Here is my jquery:

code:
$("#save_label").click( function() {		

	$("#label_details").hide("slide",{ direction: "up" }, 500, function(){		//hide form
		alert('test');
		$("#label_loading").fadeIn(500, function() {

			$.post("option_actions.php",
		          { details: "here" },
			  function(data,textStatus){

			  	if(textStatus == 'success'){
												
					$("#label_msg").html(data.message);
								
					$("#label_loading").fadeOut(500, function() { 
						$("#label_details").show("slide",{ direction: "down" }, 500)
					});
		
					if(data.result == "yes" && $("#options_holder").is(":hidden")){
						$("#options_holder").show("slide", { direction: "down" }, 500);
					}
				}					
			  }, 
			  "json"
		);
	});		

});

	});
Anybody got any idea why it would stop?

I've checked the js files and everything has uploaded fine.

keveh fucked around with this message at 08:45 on Mar 4, 2009

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

keveh posted:

OK, I am having another problem that has had me stuck for over an hour.

I developed locally and all of my jquery works fine. I've just uploaded and I can't even get past the first step.

Here is an example of where it isn't working. I've got html which looks like this:

code:
OH GOD
Anybody got any idea why it would stop?

I've checked the js files and everything has uploaded fine.

1. Fix your indenting in your post so you don't break tables so bad
2. First "duh" check: jQuery versions same on server and local machine?

KuruMonkey
Jul 23, 2004
Also the ultimate 'duh' check; in firebug's 'inspect' option, open all your css and js files' include tags, check none of them are actually 404s.

Then comment out EVERYTHING and put an alert in $(document).ready; check that gets processed. Build back up incremenally until it breaks again.

Welcome to debugging javascript; it sucks.

Ghotli
Dec 31, 2005

what am art?
art am what?
what.

KuruMonkey posted:

Also the ultimate 'duh' check; in firebug's 'inspect' option, open all your css and js files' include tags, check none of them are actually 404s.

Then comment out EVERYTHING and put an alert in $(document).ready; check that gets processed. Build back up incremenally until it breaks again.

Welcome to debugging javascript; it sucks.

You mention firebug then you tell him to use alerts. Firebug's console.log() is much cleaner in firefox for debugging. Alternatively there's a cool little logger called blackbird for debugging javascript in just about any browser.

keveh posted:

code mess.

I'm not sure how you can code with such a huge tabstop. The readability of your code will improve greatly if you change it. I'm a tabstop=2 man these days.

NotShadowStar
Sep 20, 2000

KuruMonkey posted:

Welcome to debugging javascript; it sucks.

Not so

http://alistapart.com/articles/advanceddebuggingwithjavascript

duck monster
Dec 15, 2004

Ghotli posted:

You mention firebug then you tell him to use alerts. Firebug's console.log() is much cleaner in firefox for debugging. Alternatively there's a cool little logger called blackbird for debugging javascript in just about any browser.


I'm not sure how you can code with such a huge tabstop. The readability of your code will improve greatly if you change it. I'm a tabstop=2 man these days.

Theres something magical with firebug you can do that *really* makes firebug a fantastic first line debugging environment.

FirePHP is a php library that adds the command fb() that allows you to send poo poo to the firebug console from php. The magic however, is that the console message appears nowhere in the HTML, but instead is passed via a http header line.

What that means is that you can use something like fb(array(1,2,3),'array') in the code that processes an ajax request, and it will send that array to the firebug CONSOLE without messing up the ajax request. And that, in my opinion is *huge*. In fact it even works when sending stuff back with wierd mime types like jpegs or whatever, because its an out-of-band message.

Now with all that, even with firebug and jenkman, debugging javascript still sucks.

edit: One more thing;- theres also a mini version of firebug for internet explorer, but in the form of a javascript library you <script blah=".. include in the page itself. Its not as good as the real thing, but its passable and it makes life a LOT easy than the hell that is Internet Explorer.

Normally javascript work tends to be "Debug on mozilla then smash yourhead on the desk for hours trying to debug ie7s idiocy", but this makes it ALOT easier.

duck monster fucked around with this message at 06:07 on Mar 4, 2009

keveh
Sep 14, 2004

If you have a problem.....
Apologies for the indenting and long lines, I've sorted that out now.

I did take it back to the bare basics and had the function just hide the detail div. That worked fine, the div disappeared and style turned to hidden. I've narrowed my problem down to whenever I add a parameter to the hide function, even if it's the basic jQuery call to "slow" for example, it gets stuck and can't complete the second part of it's action. It adds the wrapper, but then does nothing with it.

I've checked all my files over and over to make sure there are no 404's and the files all match the one on my local machine.

Hopefully a nights sleep will have helped me see something I couldn't spot yesterday.

KuruMonkey
Jul 23, 2004

Personally still find the first indication of a problem in a script is that all scripts on a page simply do NOTHING. Forcing me to debug everything, every time.

That sucks.

Nice debugging tools don't fix javascript's native awkwardness.

As for the other poster regarding firebug's log, I was kind of unconciously aware that I ought to use it, but haven't quite caught up to the times. (I tend to jump from from just an alert to snooping variables and using breakpoints - by the time that I;ve checked that the script is loaded, running at all, the info I want is in variables that FB exposes anyway, live, so no need for logging)

Ought to stop being lazy and use the logger.

That PHP trick sounds interesting though.

swalk
Nov 20, 2004
bucka blaow
I'm having a problem with draggable/droppable elements and slideToggle.

I have elements that are collapsed with slideToggle and normally you would click "+" to expand them. But I need these collapsed boxes to expand when you're hovering over them with a dragged element.

I sortof got it working with the code below, but once the box expands (slideDown), the droppable code doesn't work (no alert and hoverClass). If I click to expand the box, then drag and drop into it, it works as it should. Any ideas?

code:
$('.draggable').draggable({ 
	revert: true,
	revertDuration: 0,
	start: function(event, ui) {
		$(".expand").each(function(){
			var expand = $(this);
			$(this).bind("mouseover",function(){
				var el = $(this).attr('collapse');
				$('.' + el).slideDown();
			});
		});
	}
});

$('.droppable').droppable({
	drop: function(event, ui) {
		alert('dragged from ' + $(ui.draggable).attr('cat') + ' to category' + $(this).attr('cat'));
	},
	hoverClass: 'drophover'
});

TwystNeko
Dec 25, 2004

*ya~~wn*

supster posted:

What is everyone's favorite tooltip plugin? I can't seem to find one I like.

Well, I've just started with jQuery, and I found mbTooltip to be pretty good. the defaults are nice,and it doesn't flicker if you should accidently spawn it under the mouse cursor. And it looks pretty good.

My first serious jQuery app is http://shmups.info/hori/ - a drag/drop scene generator. I actually had to write a jQuery plugin to clip a div by any other, to allow for the "dragging out of bounds" effect there. I love jQuery.. but that being said..

My one pet peeve has been the UI libs. Sure, the slider's great and functional and all - but the CSS is so obfuscated and impossible to adjust. You can't effectively use the classes in your page, the themeroller is broken (sends a ridiculously huge .css file if you use it!), and there's no clue on what divs are generated without tearing apart the generated html. Their "CSS Guide" doesn't even help with using the icons they "helpfully" provide. (Add this class? Sure! Wait, it now screws up layouts, as the span is set to "block"? :argh:)

So yea. jQuery UI needs to get their poo poo together for "theming".

Save the whales
Aug 31, 2004

by T. Finn

TwystNeko posted:

My one pet peeve has been the UI libs. Sure, the slider's great and functional and all - but the CSS is so obfuscated and impossible to adjust. You can't effectively use the classes in your page, the themeroller is broken (sends a ridiculously huge .css file if you use it!), and there's no clue on what divs are generated without tearing apart the generated html. Their "CSS Guide" doesn't even help with using the icons they "helpfully" provide. (Add this class? Sure! Wait, it now screws up layouts, as the span is set to "block"? :argh:)

So yea. jQuery UI needs to get their poo poo together for "theming".

Haha, I was coming here to post that I was incredibly impressed with their themeroller. Although I didn't actually end up downloading the theme I created. If it generated reasonable CSS, you'd have to admit the themeroller (and the download page as a whole) is really slick.

I was also having trouble using their icons, and I found this website to be helpful: http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework. I used Firebug to inspect that guy's buttons and copied the styles that were coming from his personal stylesheet (as opposed to the jquery ui stylesheet) and got it working after a bit.

TwystNeko
Dec 25, 2004

*ya~~wn*
Now, THAT'S incredibly useful. Thanks!

SuckerPunched
Dec 20, 2006

I've found myself incredibly unimpressed with jQuery UI. Bloated, overly complicated, and buggy as hell. And worst of all, even at it's smallest size, it's still a GIGANTIC file. 100's of KB is not acceptable to me, for what it provides.

I'd much rather just write my own, or use a few of the individual 3rd party minified plugins to achieve the few effects that I do like out of the UI, while maintaining much more control over my CSS/HTML and keeping file size/loading down in the process.

I really want to like jQuery UI as much as I love jQuery itself, but so far they have only gotten worse as time goes on, in my opinion.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

SuckerPunched posted:

I've found myself incredibly unimpressed with jQuery UI. Bloated, overly complicated, and buggy as hell. And worst of all, even at it's smallest size, it's still a GIGANTIC file. 100's of KB is not acceptable to me, for what it provides.

I'd much rather just write my own, or use a few of the individual 3rd party minified plugins to achieve the few effects that I do like out of the UI, while maintaining much more control over my CSS/HTML and keeping file size/loading down in the process.

I really want to like jQuery UI as much as I love jQuery itself, but so far they have only gotten worse as time goes on, in my opinion.

if it weren't such a GOON PROJECT I'd suggest we make our own, as yeah, the jQuery UI stuff is pretty terrible.

SuckerPunched
Dec 20, 2006

Lumpy posted:

if it weren't such a GOON PROJECT I'd suggest we make our own, as yeah, the jQuery UI stuff is pretty terrible.

Today, the ZybourneUI is born.

TwystNeko
Dec 25, 2004

*ya~~wn*

SuckerPunched posted:

I've found myself incredibly unimpressed with jQuery UI. Bloated, overly complicated, and buggy as hell. And worst of all, even at it's smallest size, it's still a GIGANTIC file. 100's of KB is not acceptable to me, for what it provides.

I'd much rather just write my own, or use a few of the individual 3rd party minified plugins to achieve the few effects that I do like out of the UI, while maintaining much more control over my CSS/HTML and keeping file size/loading down in the process.

I really want to like jQuery UI as much as I love jQuery itself, but so far they have only gotten worse as time goes on, in my opinion.

well, I just took the bits I needed - (ui.core, ui.draggable, ui.slider) and ran them through the YUI compressor. Now I'm only loading about 35k, plus my personal code. So it's better, but still not perfect. v:shobon:v

I didn't find it overly complicated.. until I wanted to change the display of stuff. Even that link above didn't help much. I'd have to rebuild my layout from scratch.

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Has anyone used uploadify before? Anyone have a better suggestion for a simple file upload plugin with a progress bar?

withoutclass
Nov 6, 2007

Resist the siren call of rhinocerosness

College Slice
I am having some trouble getting my JQuery to work with IE6. I am trying to do the following:

code:
$("#cloneFromForm > option").hide();
where #cloneFromForm is a dropdown list generated by the Html.DropDrownList() method in ASP .Net.

I am simply trying to hide the options that are generated by the Hmtl.DropDownlist(), and it works perfectly in FireFox It seems like IE6 wont let me select an element on a page, but it does allow selecting classes or ID's.

Is there a way I can insert a class into the options generated so that I could do


code:
$("#cloneFromForm > .option").hide();
If not, could you please give me an idea as to what needs to be done to get the same effect?

SuckerPunched
Dec 20, 2006

I have a pretty strong hunch that Firefox is the broken one in this case, allowing you to hide <option> tags.

The correct/better way is to remove/add the items that are unavailable, and add them back in when a valid selection is made.

I've used and like this plugin for easier selectbox manipulation: http://www.texotela.co.uk/code/jquery/select/

Adbot
ADBOT LOVES YOU

Supervillin
Feb 6, 2005

Pillbug

withoutclass posted:

It seems like IE6 wont let me select an element on a page, but it does allow selecting classes or ID's.

Adding/removing items is the "right" way, like SuckerPunched said, but also IE6 doesn't recognize the child selector ">" in CSS. Haven't looked at jQuery's source in a while so I'm not sure how they implement getting that path (since obviously it's JS, not CSS), but that might be why IE6 barfs.

  • Locked thread