@@ -154,36 +154,36 @@ goat.utils = {
154
154
ajaxifyAttackHref : function ( ) {
155
155
/* Jason I commented this implementation out
156
156
* I think we should show the attack link on the lessons that need it by modifying the lesson
157
- * itself or we could add a new button up top for "show lesson link"
157
+ * itself or we could add a new button up top for "show lesson link" */
158
+ //re-enabling for now ... was breaking external links
158
159
$ . each ( $ ( 'a[href^="attack?"]' ) ,
159
- function(i,el) {
160
- var url = $(el).attr('href');
161
- $(el).attr('href','#');
162
- $(el).attr('link',url);
163
- //TODO pull currentMenuId
164
- $(el).click(
165
- function() {
166
- var _url = $(el).attr('link');
167
- $.get(_url, {success:showResponse});
168
- }
169
- )
170
- }
171
- );
172
- */
160
+ function ( i , el ) {
161
+ var url = $ ( el ) . attr ( 'href' ) ;
162
+ $ ( el ) . unbind ( 'click' ) . attr ( 'href' , '#' ) . attr ( 'link' , url ) ;
163
+ //TODO pull currentMenuId
164
+ $ ( el ) . click (
165
+ function ( ) {
166
+ var _url = $ ( el ) . attr ( 'link' ) ;
167
+ $ . get ( _url , { success :showResponse } ) ;
168
+ }
169
+ ) ;
170
+ } ) ;
171
+
173
172
// alternate implementation
174
173
// unbind any bound events so we are safe to be called twice
174
+ /*
175
175
$('#lesson_content a').unbind('click');
176
176
$('#lesson_content a').bind('click', function(event) {
177
177
event.preventDefault();
178
178
$.get(this.href, {}, function(response) {
179
179
$('#lesson_content').html(response);
180
180
});
181
- } ) ;
181
+ });*/
182
182
}
183
183
} ;
184
184
185
185
186
186
$ ( window ) . resize ( function ( ) {
187
187
//$('#leftside-navigation').css('height',$('div.panel-body').height());
188
188
console . log ( $ ( window ) . height ( ) ) ;
189
- } ) ;
189
+ } ) ;
0 commit comments