Greetings
This is another short and sweet posts, basically it involves using the Math. function to do some nifty tricks
Lets say that you want to get a random number between 1 and 10 and you dont know how. Well the answer is quite easy and it involves combining 2 Math. functions. Math.floor() and Math.random().
This function takes a random number between 0 and 1
This function rounds a number down to it’s smaller number, for example. 4.4 would become 4, 4.6 would become 4 as well, -4.1 would become -5 as well as -4.6 would become -5 as well.
Tags: Javascript, Javascript comparing numbers
Categories: Javascript, jQuery
Posted By: Dinulescu Alexandru Adrian
Last Edit: 14 Feb 2010 @ 11:37 PM
Hello
This issue only happens with menuMatic and with vertical set menus. Basically in all IE browsers the sub-nav-menu didnt show up correctly.
And another thing, when you have link tags inside li tags, you need to float the li tags in IE else you get a hidden spacer there (vertical lists only). and the menu looks very odd. This is old IE6 issue, seems like both IE7 and only IE8 fixed it. Fuck that shit.
Tags: IE Bugs, Javascript, menuMatic, mooTOOLs
Categories: IE6 Bugs, Javascript
Posted By: Dinulescu Alexandru Adrian
Last Edit: 05 Feb 2010 @ 09:57 PM
JQuery Negation
Basically this is a negation of the following, god damnit my head hurts
Oh well new day, new learned things. God Bless Amerika
Tags: Javascript, jQuery, Nerd Rage
Categories: jQuery
Posted By: Dinulescu Alexandru Adrian
Last Edit: 09 Dec 2010 @ 02:04 PM
Hello
This post is going to be short and sweet. Basically jQuery 1.4 launched a couple of days ago and i thought i’d move my blog from 1.3.2 to 1.4 and lo and behold JS Error.
I was going like WTF, and after trying to debug it for like 15mins i come to the following conclusion. From my own personal experience, in jQuery 1.3.2 when you wanted something to happen to an element you went like this. Since i use WordPress for as my blogging platform not everytime the .elementClass element was present.
Tags: InanisMOD Theme, Javascript, jQuery 1.4, jQuery Bugs
Categories: Javascript, jQuery
Posted By: Dinulescu Alexandru Adrian
Last Edit: 25 Jan 2010 @ 06:19 PM
Hello
This post is a very straightforward one, basically it involves using javascript to calculate the lowest or highest number from either an array or from some definite variables.
One of the very useful possibilities of this is calculating the height and width of more than 3 columns and equalizing everything to the highest.
To achieve this we can use the Math.max() property and the Math.min() property.
Tags: Javascript, Javascript comparing numbers
Categories: Javascript
Posted By: Dinulescu Alexandru Adrian
Last Edit: 15 Jan 2010 @ 12:23 AM
Recent Comments