Click here to Skip to main content
15,885,546 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Creating a vertical auto-hide toolbar Pin
Mohibur Rashid27-Sep-12 15:09
professionalMohibur Rashid27-Sep-12 15:09 
GeneralRe: Creating a vertical auto-hide toolbar Pin
Chen Renjun27-Sep-12 15:26
Chen Renjun27-Sep-12 15:26 
AnswerRe: Creating a vertical auto-hide toolbar Pin
jkirkerx27-Sep-12 18:06
professionaljkirkerx27-Sep-12 18:06 
GeneralRe: Creating a vertical auto-hide toolbar Pin
n.podbielski28-Sep-12 6:06
n.podbielski28-Sep-12 6:06 
GeneralRe: Creating a vertical auto-hide toolbar Pin
jkirkerx28-Sep-12 6:12
professionaljkirkerx28-Sep-12 6:12 
GeneralRe: Creating a vertical auto-hide toolbar Pin
n.podbielski28-Sep-12 8:43
n.podbielski28-Sep-12 8:43 
GeneralRe: Creating a vertical auto-hide toolbar Pin
jkirkerx28-Sep-12 9:05
professionaljkirkerx28-Sep-12 9:05 
GeneralRe: Creating a vertical auto-hide toolbar Pin
n.podbielski28-Sep-12 10:44
n.podbielski28-Sep-12 10:44 
So it's customer doings... I should suspect that.
In that case. Maybe you should consider using css from webresource.axd as part of some assembly. Just like DevExpress. But it is harder to maintain and deploy than just simple css file.
But maybe it can suit your situation.

I was also experimenting in doing something like this purely in css. It's posible, but seems to work for now nice only in FF. It's works like flag on/off in IE, Opera. In Chrome looks like crap.
But maybe you can do something with that:
http://jsfiddle.net/LnbuM/[^]

Another idea: http://jqueryui.com/demos/hide/[^]
But since this framework uses css as well and your customer is breaking that...

But this not change fact that you hardcoded part of asp.net id into js. I stumble on bugs coming from that few times. In current project I created in aspx file js object containing aspx controls ids for selecting them from jQuery. I benefit from compilation of pages:

HTML
<script>
var selector = '<%=control.ClientId%>'
</script>


but it's have to be separated from main js script in .js file.
So next time i will use some css class to avoid this separation.

But mainly i would cut if parts with "-360px" and use some predefined even only for this (without css rules). jQuery().hasClass(), addClass, toggleClass, removeClass functions are specifically for something like this. Since you have in auto hider only 2 states (visible/not visible) you can toggle this in single event:

JavaScript
$('.autohider').toggleClass('visible');


As for innerText/Html. What differences between browsers you have found? I am not specification expert. But it's pretty basic. Text sets text, and html set html. If it's not in all browsers, use
$().text and $().html functions.

Creating elements? I would rather use
JavaScript
$('.container').append('<td style="someStyle">someText</td>')
. It's hardcoded to but for me easier for eyes and cause of that for maintain.

Maybe I sound like jQuery fan boy, but why you should reinvent the wheel since jQuery folks done that before and it's works? I think they wheel is more... round then yours or main.
Wink | ;)
No more Mister Nice Guy... >: |

GeneralRe: Creating a vertical auto-hide toolbar Pin
jkirkerx28-Sep-12 12:16
professionaljkirkerx28-Sep-12 12:16 
GeneralRe: Creating a vertical auto-hide toolbar Pin
n.podbielski28-Sep-12 12:51
n.podbielski28-Sep-12 12:51 
GeneralRe: Creating a vertical auto-hide toolbar Pin
jkirkerx29-Sep-12 19:24
professionaljkirkerx29-Sep-12 19:24 
GeneralRe: Creating a vertical auto-hide toolbar Pin
n.podbielski29-Sep-12 22:04
n.podbielski29-Sep-12 22:04 
QuestionFantastic site demonstrating and teaching "responsive" UI concepts using JavaScript, HTML 5, etc. Pin
BillWoodruff25-Sep-12 13:46
professionalBillWoodruff25-Sep-12 13:46 
AnswerRe: Fantastic site demonstrating and teaching "responsive" UI concepts using JavaScript, HTML 5, etc. Pin
Steve Bondy7-Dec-12 12:38
Steve Bondy7-Dec-12 12:38 
QuestionUsing Jquery in DataList Pin
mrkeivan19-Sep-12 6:17
mrkeivan19-Sep-12 6:17 
AnswerRe: Using Jquery in DataList Pin
jkirkerx25-Sep-12 18:01
professionaljkirkerx25-Sep-12 18:01 
AnswerRe: Using Jquery in DataList Pin
gjllyl9-Oct-12 19:36
gjllyl9-Oct-12 19:36 
QuestionHow to calculate difference between two dates Pin
Robymon17-Sep-12 23:46
Robymon17-Sep-12 23:46 
AnswerRe: How to calculate difference between two dates Pin
Joan M18-Sep-12 4:59
professionalJoan M18-Sep-12 4:59 
Questionfyi: accidental find: using JavaScript DOM in browser to parse a URL Pin
BillWoodruff14-Sep-12 22:54
professionalBillWoodruff14-Sep-12 22:54 
AnswerRe: fyi: accidental find: using JavaScript DOM in browser to parse a URL Pin
ziggyfish10-Oct-12 6:26
ziggyfish10-Oct-12 6:26 
Questiongoogle map splite write problem Pin
chogrf13-Sep-12 2:48
chogrf13-Sep-12 2:48 
QuestionFastest way to select all elements in a *ListBox* Pin
A*****12-Sep-12 19:32
A*****12-Sep-12 19:32 
AnswerRe: Fastest way to select all elements in a *ListBox* Pin
BobJanova12-Sep-12 23:04
BobJanova12-Sep-12 23:04 
GeneralRe: Fastest way to select all elements in a *ListBox* Pin
A*****13-Sep-12 12:27
A*****13-Sep-12 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.