You could consider modifying your plugin to follow the jQuery UI
Widget format. This takes advantage of the widget factory, which
provides ways to access the methods and properties in 2 ways:
1) Through the element the plugin is applied to, eg:
$("#myElement").smartList("selectedValue")
2) Or
@Dave
> If this problem has a good fix, it should be fixed. There are several
> cases that will break differently in IE when this proposed fix is
> applied. It's not achieving consistent cross-browser behavior. There
> may be a solution out there still, and if someone has one they should
> post it
I create a lot of web-application list-screens with fixed-headers. I
prefer to *not* work with a THEAD for this purpose because it is too
limiting for complex page layouts. Instead, I create TWO tables - one
for the headers and one for the content. This works well as long as
you use table-layout:f
I have reposted this in the DEV forum...
http://groups.google.com/group/jquery-dev/browse_thread/thread/16bd78710291bc93?hl=en#
I am getting erratic results when trying to get the position of a LI
element. Every browser gives different results - only IE7 seems to get
it right...
I have a navbar UL element nested a few levels deep within DIVs that
provide page structure. The UL is also nested within a SPAN (inline-
block)
@Dave
>
> with the "fix", fades out but then pops to 50% opacity
I'm not sure why this 'fix' should be added to fadeOut? It seems most
applicable to fadeIn and fadeTo. But whatever the case, a little extra
code could handle edge-cases -- something like...
if (jQuery.browser.msie && $(this).c
If browser-detection can't be used, then subsititute code to detect
the "filter" attribute instead. The exact syntax is not important...
I believe jQuery SHOULD handle this cross-browser animation issue
because it is common to the majority of users. It is clearly a
deficiency when jQuery's own co
@Rick
>
> if (jQuery.browser.msie)
> this.style.removeAttribute('filter');
This is a nice simple solution to a common cross-browser issue, so
wouldn't it be reasonable for this to be added to the standard jQuery
animate method? The extra size is minimal.
/Kevin
On Sep 25, 5:17 pm, "Rick Fai
If you need data for multiple fields, then a 3rd option is to create a
single hash/data object for the page and writing all your data into
that. This makes your data easy to read and debug, and is highly
efficient because you don't have to 'parse' anything...
var Record = {
foo: "db-value-1"
OOPS, I didn't formatted the data correctly for passing to Plot() -
sorry, didn't read carefully. But the premise is the same - create an
array by looping your data, and then pass the array when done.
/Kevin
On Aug 30, 9:04 am, Kevin Dalman wrote:
> Hi Glenn,
>
> Create
Hi Glenn,
Create an array and 'push' each hash of plot data onto it. When the
loop is complete, pass the now complete array...
$.getJSON('/Graph/HearthRateDataJSON', "", function(data) {
var data= [ ];
$.each(data, function(entryindex, entry) {
data.push( { Name: entry['Name'], S
Good points by Josh. However this selector example...
$('img[class="thumb"]).mouseover
...can be written simpler as
$("img.thumb").mouseover
It's faster in most browsers to select-by-class than to iterate
elements and 'read attributes'. jQuery may process both syntaxes the
same (?), but us
If you cannot change the scrolling by modifying the iframe, then do it
by modifying the document inside the iframe.
I don't remember the syntax for accessing the document/body elements
inside an iframe, so I'll just use pseudo-code here. You should be
able to find the correct syntax easily...
$(
I have not tried DD Roundies yet - it's on my todo list. Hoever I am
using a jquery plug-in called 'Cornerz' that is working very well for
me. It uses Canvas/VML for corners, but does not require any
additional plug-ins:
http://labs.parkerfox.co.uk/cornerz/
This plug-in does *not* automatically
ilter: alpha(opacity=1);
}
Then in the HEAD of you page, add a STYLE block inside a NOSCRIPT
block...
#media-gallery ul li img {
/* UNDO the opacity rule set previously */
opacity: 1;
filter: alpha(opacity=100);
}
Just one more idea.
/Kevin
On Apr 29, 9:58 am, Kevin Dalman wrote:
Hi Rick,
Karl's suggestion seems the most elegant (assuming it works OK).
Here is some sample code for what he is suggesting
-- in HEAD or a stylesheet...
body.js #media-gallery ul li img {
/* opacity *may* work better than display:none */
opacity: 0.01;
filter: alpha(opacity=1);
}
For anyone interested, here is the updated set of 'tests' for the test
page I posted previously. This is the test-set John is currently
using:
// Test # 1
start = new Date();
$Test = $("#div"+ myDiv +" p");
end = new Date();
a_Selectors.push('$("#div'+ myDiv +' p")');
a_Times.push(end - s
@John: I found a little bug in your v1.3.3 test version...
This selector works fine in FireFox, but bombs out in IE7...
$("#div50 p")
IE7 --> "Object doesn't support this property or method"
But this works fine:
$("#div50 > p")
NOTE that I'm pulling v1.3.3 directly from your personal c
That's a fantastic improvement. But now I have a new challenge - keep
reading...
To see if there really is a difference between the 2nd and 3rd
options, or whether it is just 'variance', I cranked up the DIVs & Ps
and tried both versions again:
ALL tests below are in FireFox 3.0.6
--
FYI, I built a quick test page for this. As previously noted, the
differences in v1.2.6 are relatively small - about 2x as long for one
syntax over the other. But with 1.3.2 - Wow! - 60x longer!
jQuery version used = 1.3.2
Total number of DIVs = 100
Paragraphs per DIV = 50
---
John wrote: "You should always use $("#foo").find("p") in favor of $
("p", $("#foo")) "
I'm trying to extrapolate some general concepts from this 'rule'...
First, I *assume* these two statements are identical in performance:
$("p", $("#foo")) == $("p", "#foo")
If so, then does it matter what t
Rick, based on what I've learned from testing, you have another option
now...
Here is a modified version of Mike's code - without generating the
table.
function populateDutyTable(response) {
var currentDay = '';
var rows = response.QGETDUTYSCHEDULE.DATA;
var out = []
I identified why the $("").append syntax is so extremely slow
in the sample page. It actually has nothing to do with being a 'second
DOM append' as was assumed. Here is what I learned from my testing...
This is the HTML mark-up for the tests:
I generated the same 'html' var
> * Instead of inserting a large number of sibling DOM elements (the TRs)
> together, inserts only a single DOM element (the TABLE).
>
> Now it is very useful to know how much of the performance improvement is due
> to each of these individual tricks, and thank you for doing that testing. My
&
If you are going to apply a specific iframe height via script...
$('#myIframe').css({height:$(this).parent('td').height()});
...You MUST bind an event to window.resize to *re-size* the iframe
whenever the browser window is resized.
/Kevin
On Jan 30, 10:58 am, jquertil wrote:
> I think you're
Hi Dave,
You've probably long-since moved on from this, but I stumbled across
this topic again, so thought I'd answer anyway...
There are lots of examples on the Layout website for creating a
'layout' around an iframe - use one of these as a starting point...
http://layout.jquery-dev.net/demos/
These test pages DO NOT accurately compare the speed of array.join("")
VS string+="...". The biggest speed difference between the two is
REALLY that one uses $("") and one doesn't. If this is
removed from the 'slow' page, the load-speed goes from 8.7 sec to 1.5
sec. This is still 6-times longer th
Unless jQuery 1.3 has made vast improvement in the "name=Xxx"
functionality, it is *horrendously slow*! I use a custom function to
access form-fields - $F("fieldName") - which is up to 1000-times
faster on large pages in my web-application. But this method is
dependant on other custom methods, so
is width:90%; and I replace it with
width:985px;, the width *would not change* (assuming 985 is the pixel
equivalent).
On Jan 26, 3:03 pm, Matt wrote:
> $('#Test').css('width') ?
>
> On Jan 26, 11:46 am, Kevin Dalman wrote:
>
>
>
> > jQuery has inn
ot;).layout({
> closable: false
> , resizable: false
> , spacing_open: 0
> });
> });
>
> src="file_tree.php" border="0" width="100%" scroll="auto">
>
> but
Use the effects in jQuery-UI when you need more than basic slideUp/
slideDown. Using show & hide with the appropriate options will allow
you to slide in any direction. You also have a lot more effects to
choose from then just 'slide'
To open by sliding 'up', and close in reverse...
$E.show( 'sli
(Sorry if this is a duplicate post)
Hi Dave,
This plugin may be more than you need, but...
The UI/Layout widget will automatically position and size an iframe
(or other element) to fill the entire page, OR allow for a header,
footer, or sidebars. The code and markup are dead-simple. Here is an
Hi Dave,
This plugin may be more than you need, but...
The UI/Layout widget will automatically position and size an iframe
(or other element) to fill the entire page, OR allow for a header,
footer, or sidebars. The code and markup are dead-simple. Here is an
example with a page-banner and an ifr
jQuery has innerHeight/Width and outerHeight/Width methods, but is
there a method that can return a 'CSS Height/Width'. A CSS width is
the width that would be applied via CSS to achieve a given 'outer
width'. This value will differ depending on the box model and other
older browser idiosyncracies.
34 matches
Mail list logo