Click here to Skip to main content

JavaScript

 
QuestionFind the selected radio button immediately using the 'this' variable in he javascript Pinmemberhiredotnet4-Oct-12 21:53 
AnswerRe: Find the selected radio button immediately using the 'this' variable in he javascript Pinmemberjohn-ph5-Oct-12 5:02 
QuestionPreventing Duplicate Form Submissions in JavaScript Pinmemberhiredotnet3-Oct-12 20:10 
QuestionUnit testing in JavaScript Pinmemberhiredotnet2-Oct-12 22:01 
AnswerRe: Unit testing in JavaScript PinmemberSpiff Dog9-Oct-12 10:43 
QuestionCreating a vertical auto-hide toolbar PinmemberChen Renjun26-Sep-12 18:02 
AnswerRe: Creating a vertical auto-hide toolbar PinmemberMohibur Rashid27-Sep-12 16:09 
GeneralRe: Creating a vertical auto-hide toolbar PinmemberChen Renjun27-Sep-12 16:26 
AnswerRe: Creating a vertical auto-hide toolbar Pinmemberjkirkerx27-Sep-12 19:06 
GeneralRe: Creating a vertical auto-hide toolbar Pinmembern.podbielski28-Sep-12 7:06 
GeneralRe: Creating a vertical auto-hide toolbar Pinmemberjkirkerx28-Sep-12 7:12 
GeneralRe: Creating a vertical auto-hide toolbar Pinmembern.podbielski28-Sep-12 9:43 
GeneralRe: Creating a vertical auto-hide toolbar Pinmemberjkirkerx28-Sep-12 10:05 
GeneralRe: Creating a vertical auto-hide toolbar Pinmembern.podbielski28-Sep-12 11: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:
 
<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:
 
$('.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
$('.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 Pinmemberjkirkerx28-Sep-12 13:16 
GeneralRe: Creating a vertical auto-hide toolbar Pinmembern.podbielski28-Sep-12 13:51 
GeneralRe: Creating a vertical auto-hide toolbar Pinmemberjkirkerx29-Sep-12 20:24 
GeneralRe: Creating a vertical auto-hide toolbar Pinmembern.podbielski29-Sep-12 23:04 
QuestionFantastic site demonstrating and teaching "responsive" UI concepts using JavaScript, HTML 5, etc. PinmemberBillWoodruff25-Sep-12 14:46 
AnswerRe: Fantastic site demonstrating and teaching "responsive" UI concepts using JavaScript, HTML 5, etc. PinmemberSteve Bondy7-Dec-12 13:38 
QuestionUsing Jquery in DataList Pinmembermrkeivan19-Sep-12 7:17 
AnswerRe: Using Jquery in DataList Pinmemberjkirkerx25-Sep-12 19:01 
AnswerRe: Using Jquery in DataList Pinmembergjllyl9-Oct-12 20:36 
QuestionHow to calculate difference between two dates PinmemberRobymon18-Sep-12 0:46 
AnswerRe: How to calculate difference between two dates PinmemberJoan Murt18-Sep-12 5:59 
Questionfyi: accidental find: using JavaScript DOM in browser to parse a URL PinmemberBillWoodruff14-Sep-12 23:54 
AnswerRe: fyi: accidental find: using JavaScript DOM in browser to parse a URL Pinmemberziggyfish10-Oct-12 7:26 
Questiongoogle map splite write problem Pinmemberchogrf13-Sep-12 3:48 
QuestionFastest way to select all elements in a *ListBox* PinmemberA*****12-Sep-12 20:32 
AnswerRe: Fastest way to select all elements in a *ListBox* PinmemberBobJanova13-Sep-12 0:04 
GeneralRe: Fastest way to select all elements in a *ListBox* PinmemberA*****13-Sep-12 13:27 
GeneralRe: Fastest way to select all elements in a *ListBox* PinmemberA*****13-Sep-12 19:55 
Questionjavascript _> activex passing by reference PinmemberJohan000112-Sep-12 2:40 
AnswerRe: javascript _> activex passing by reference Pinmembertwseitex16-Sep-12 2:09 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 1:46 
GeneralRe: javascript _> activex passing by reference Pinmembertwseitex17-Sep-12 9:30 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 22:38 
GeneralRe: javascript _> activex passing by reference Pinmembertwseitex18-Sep-12 9:58 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000119-Sep-12 0:28 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000117-Sep-12 2:03 
AnswerRe: javascript _> activex passing by reference [modified] PinmvpManfred R. Bihy19-Sep-12 2:02 
GeneralRe: javascript _> activex passing by reference PinmemberJohan000119-Sep-12 3:02 
GeneralRe: javascript _> activex passing by reference PinmvpManfred R. Bihy19-Sep-12 3:06 
GeneralRe: javascript _> activex passing by reference PinmvpManfred R. Bihy19-Sep-12 3:12 
QuestionCreate AD block functionality for my website Pinmemberswayam.test1.gmail10-Sep-12 20:58 
AnswerRe: Create AD block functionality for my website Pinmemberenhzflep11-Sep-12 23:06 
QuestionHow does Google show_ads.js work? Pinmemberswayam.test1.gmail10-Sep-12 20:57 
QuestionHow to send request data from one tab to other tab which are on same jsp Pinmembermayureshdh9-Sep-12 19:52 
Questionjavascript/jquery [modified] Pinmemberchaim_zvi8-Sep-12 9:50 
Questionshow alert in javascript and not continue Pinmemberptvce6-Sep-12 22:26 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150123.1 | Last Updated 23 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid