Skip to content

Commit 1e48389

Browse files
committed
More Changes to the ReadMe
1 parent fb5dba1 commit 1e48389

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bower install macy
1616

1717
## Usage
1818
```javascript
19-
var macy_instance = Macy({
19+
var macyInstance = Macy({
2020
// See below for all available options.
2121
});
2222
```
@@ -104,7 +104,7 @@ This would change the xMargin to 20px when screens are smaller than 760, but the
104104

105105
## Methods
106106

107-
##### **Macy**
107+
#### **Macy**
108108
*Parameters: `{Object} args - required`*
109109

110110
This is the initializing function. The function takes an object of properties listed above. The only required property is container which would be the *selector* for the element that contains all the elements you want to be layed out:
@@ -127,61 +127,61 @@ var macy = Macy({
127127

128128
From this point on whenever 'Macy' is specified it is referencing the variable you assign macy to when making the initial call.
129129

130-
##### **recalculate**
130+
#### **recalculate**
131131
*Parameters: `{Boolean} refresh - can be null` & `{Boolean} loaded -can be null` *
132132

133133
When called this recalculates the entire layout, this becomes useful if you just used ajax to pull in more content:
134134

135135
```javascript
136-
macy_instance.recalculate();
136+
macyInstance.recalculate();
137137
```
138138

139-
##### **runOnImageLoad**
139+
#### **runOnImageLoad**
140140

141141
*Parameters: `{Function} - Function to run on image load` & `{Boolean} If true it will run everytime an image loadsl`*
142142

143143
runOnImageLoad is a method used to do something each time and image loads or after all images have been loaded. This helps when using Ajax to make sure the layout is worked out correctly when images are loading. Using this in conjunction with the recalculate function makes your layouts look great no matter how long it takes to load in your images:
144144

145145
```javascript
146-
macy_instance.runOnImageLoad(function () {
147-
macy_instance.recalculate(true);
146+
macyInstance.runOnImageLoad(function () {
147+
macyInstance.recalculate(true);
148148
}, true);
149149
```
150150

151151
If you only require it to run once all the images have loaded you can acheive this by passing null as the first parameter:
152152

153153
```javascript
154-
macy_instance.runOnImageLoad(function () {
154+
macyInstance.runOnImageLoad(function () {
155155
console.log('I only get called when all images are loaded');
156-
macy_instance.recalculate(true, true);
156+
macyInstance.recalculate(true, true);
157157
});
158158
```
159159

160160
If you only require the during function to run then only pass it one function:
161161

162162
```javascript
163-
macy_instance.runOnImageLoad(function () {
163+
macyInstance.runOnImageLoad(function () {
164164
console.log('Every time an image loads I get fired');
165-
macy_instance.recalculate(true);
165+
macyInstance.recalculate(true);
166166
}, true);
167167
```
168168

169-
##### **remove**
169+
#### **remove**
170170
*Parameters: `None`*
171171

172172
Remove does exactly what it says on the tin, it removes all styling and event listeners that Macy added to the DOM:
173173

174174
```javascript
175-
macy_instance.remove();
175+
macyInstance.remove();
176176
```
177177

178-
##### **reInit**
178+
#### **reInit**
179179
*Parameters: `None`*
180180

181181
Reinitialises the current macy instance;
182182

183183
```javascript
184-
macy_instance.reInit();
184+
macyInstance.reInit();
185185
```
186186

187187
---

0 commit comments

Comments
 (0)