- Screen name: mikeycgto
mikeycgto's Profile
3 Posts
1 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- https://github.com/mikeycgto/jquery.whiny.js
We've all done something like this:
- $('#id').text('new text');
And wondered why the code wasn't working only to find out the selector was wrong. jQuery.whiny.js attempts to solve this problem by altering the jQuery library so the jQuery() method will create a console warning if an empty jQuery object returned.
In the above example, if '#id' returned an empty jQuery object you'd see the following console warning:
- jQuery was called with a selector of '#id' and returned an empty object
Note: This is strictly for dev purposes! It is simply a development tool.
- I am using some buttons with the UI Button Widget for navigation (actually anchor tags being make to buttons via button()). To show which page is currently selected (and is being viewed), I have this button given defaulting to the 'ui-state-active' class.This doesn't play nicely with the UI Buttons widget for when you mouse over initially, nothing changes (since ui-state-active is preceding ui-state-hover). When you mouseout the element, it'll change to ui-state-default thus no longer showering this page as 'active'.This is solved via the following JS:
- $('a.ui-state-active').mouseover(function(){
- $(this).removeClass('ui-state-active');
- }).mouseout(function(){
- $(this).addClass('ui-state-active');
- });
(haven't tested this extensively; may have unforeseen side-effects. The selector I am using is actually more specific for my HTML)I am wondering if it would be possibly to add some logic to the UI Button Widget to be aware when an element starts off as ui-state-active and if so, return it to that state on the mouseout.- 18-Oct-2010 12:46 PM
- Forum: Developing jQuery UI
This rule is as such:
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/img.png) 50% 50% repeat-x; color: #003f87; font-weight: bold; }
I would expect the position to be 50% 0% however; if this element is to large, the background image is not flush against the top of the element and the gradient looks all funky.
Perhaps my header elements are a bit large...
- «Prev
- Next »
Moderate user : mikeycgto
© 2013 jQuery Foundation
Sponsored by and others.

